From e4cf295d74a6ad9ecca658fa2653b68e05bf8572 Mon Sep 17 00:00:00 2001 From: Aakash Hotchandani Date: Fri, 10 Jul 2026 11:17:19 +0530 Subject: [PATCH 1/2] chore(release): enable first publish (version floor 9.29.1, minor changeset, canary path) Queues the first publish of @wdio/browserstack-service from this repo and adds a canary validation path: - package.json: version 9.28.0 -> 9.29.1 (align to npm `latest` so the changeset bump lands above it; a bump from 9.28.0 would be <= 9.29.1 and npm would reject it). - .changeset: add a minor changeset (ported LTS + Test-Case-ID features + fixes) -> the "Version Packages" PR will compute 9.30.0. - .changeset/config.json: snapshot.useCalculatedVersion=true so canary versions read -canary- (e.g. 9.30.0-canary-...). - release.yml: add a workflow_dispatch `canary` input; the normal changesets/action step is gated to push events, and a new canary step snapshot-publishes pending changesets to the `canary` dist-tag via the SAME OIDC trusted publisher (validates OIDC + provenance without touching `latest`). Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/config.json | 5 ++++- .changeset/port-upstream-service-parity.md | 5 +++++ .github/workflows/release.yml | 22 ++++++++++++++++++++++ packages/browserstack-service/package.json | 2 +- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .changeset/port-upstream-service-parity.md diff --git a/.changeset/config.json b/.changeset/config.json index fce1c26..1d44fe4 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,8 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": [], + "snapshot": { + "useCalculatedVersion": true + } } diff --git a/.changeset/port-upstream-service-parity.md b/.changeset/port-upstream-service-parity.md new file mode 100644 index 0000000..846336b --- /dev/null +++ b/.changeset/port-upstream-service-parity.md @@ -0,0 +1,5 @@ +--- +"@wdio/browserstack-service": minor +--- + +Publish from the standalone `browserstack/wdio-browserstack-service` repo, at parity with the WebdriverIO monorepo. Includes Load Testing Service (LTS) support, one-to-many Test-Case-ID tagging (`setCustomTestCaseId`), correct test/hook finish on mocha timeouts, per-batch failure isolation in the request queue, accessibility Browser type augmentations, and `yauzl` upgraded to `^3.4.0`. No user-facing API change. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cac6a58..782a527 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,12 @@ on: branches: - main # v9 line -> dist-tag "latest" - v8 # v8 line -> dist-tag "v8" (from publishConfig.tag on the v8 branch) + workflow_dispatch: + inputs: + canary: + description: 'Publish a canary prerelease to the npm `canary` dist-tag (validates OIDC + provenance end-to-end; never touches `latest`). Requires at least one pending changeset.' + type: boolean + default: false # Never run main and v8 releases on top of each other. concurrency: release-${{ github.ref }} @@ -63,7 +69,10 @@ jobs: - name: Test run: npm test + # Normal release (push to main / v8): open the "Version Packages" PR, or once that PR is + # merged, publish to latest (main) / v8 (v8 branch, via publishConfig.tag). - name: Create Release PR or publish to npm + if: github.event_name == 'push' uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1 with: version: npm run version # changeset version (opens the "Version Packages" PR) @@ -73,3 +82,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # No NPM_TOKEN: auth is OIDC via id-token: write above. NPM_CONFIG_PROVENANCE: 'true' + + # Canary (manual, workflow_dispatch with canary=true): snapshot-version the pending + # changesets and publish a prerelease to the `canary` dist-tag via the SAME OIDC trusted + # publisher. Validates OIDC + provenance end-to-end without touching `latest`. + # snapshot.useCalculatedVersion=true in .changeset/config.json makes the version + # -canary- (e.g. 9.30.0-canary-...). Requires >=1 pending changeset. + - name: Canary publish to `canary` dist-tag + if: github.event_name == 'workflow_dispatch' && inputs.canary + run: | + npx changeset version --snapshot canary + npx changeset publish --no-git-tag --tag canary + env: + NPM_CONFIG_PROVENANCE: 'true' diff --git a/packages/browserstack-service/package.json b/packages/browserstack-service/package.json index 2651bd0..5ad6aa2 100644 --- a/packages/browserstack-service/package.json +++ b/packages/browserstack-service/package.json @@ -1,6 +1,6 @@ { "name": "@wdio/browserstack-service", - "version": "9.28.0", + "version": "9.29.1", "description": "WebdriverIO service for better Browserstack integration", "author": "BrowserStack ", "homepage": "https://github.com/browserstack/wdio-browserstack-service", From c9f1ed814ad126284b436724b74ee632c0b9c812 Mon Sep 17 00:00:00 2001 From: Aakash Hotchandani Date: Fri, 10 Jul 2026 14:37:19 +0530 Subject: [PATCH 2/2] =?UTF-8?q?chore(release):=20make=20publishing=20manua?= =?UTF-8?q?l=20(hybrid)=20=E2=80=94=20push=20opens=20Version=20PR,=20publi?= =?UTF-8?q?sh=20is=20workflow=5Fdispatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split the single changesets step into two: - push to main/v8 runs changesets in version-only mode (opens/updates the "Version Packages" PR; never publishes — merging that PR is now a no-op). - Publishing is a manual workflow_dispatch input (publish=true): changeset publish -> npm (main -> latest, v8 -> v8) with git tag + GitHub release + provenance over the same OIDC trusted publisher. Canary path unchanged. Addresses review: publishing no longer happens automatically on a merge. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 40 ++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 782a527..12aa288 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,14 +11,25 @@ name: Release # # The gRPC/protobuf client is generated inline at build time (buf generate); there is no # separate core package for this workflow to version or publish. +# +# Release model (publishing is MANUAL): +# * push to main / v8 -> opens/updates the "Version Packages" PR only. NEVER publishes; +# merging that PR does NOT publish either. +# * Run workflow (publish) -> publishes the merged version to npm (main -> `latest`, +# v8 -> `v8`) with git tag + GitHub release + provenance. +# * Run workflow (canary) -> snapshot prerelease to the npm `canary` dist-tag. on: push: branches: - - main # v9 line -> dist-tag "latest" - - v8 # v8 line -> dist-tag "v8" (from publishConfig.tag on the v8 branch) + - main # v9 line -> opens Version PR (publish target: dist-tag "latest") + - v8 # v8 line -> opens Version PR (publish target: dist-tag "v8" via publishConfig.tag) workflow_dispatch: inputs: + publish: + description: 'Publish the merged version to npm (main -> `latest`, v8 -> `v8`). Merge the "Version Packages" PR first so there are no pending changesets.' + type: boolean + default: false canary: description: 'Publish a canary prerelease to the npm `canary` dist-tag (validates OIDC + provenance end-to-end; never touches `latest`). Requires at least one pending changeset.' type: boolean @@ -48,8 +59,6 @@ jobs: # NODE_AUTH_TOKEN that becomes an empty token line that can shadow OIDC Trusted # Publishing at `npm publish` time. npm already defaults to registry.npmjs.org and # publishConfig.access=public handles the scoped publish, so the line isn't needed. - # (Follow-up to consider: split changesets/action so publish runs as its own - # top-level step — further de-risks OIDC. Tracked, not done here.) uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 22 # resolves to >= 22.14 on the runner (OIDC floor) @@ -69,13 +78,28 @@ jobs: - name: Test run: npm test - # Normal release (push to main / v8): open the "Version Packages" PR, or once that PR is - # merged, publish to latest (main) / v8 (v8 branch, via publishConfig.tag). - - name: Create Release PR or publish to npm + # Version PR (push to main / v8): run changesets in VERSION-ONLY mode — open or update the + # "Version Packages" PR (version bump + CHANGELOG). This step NEVER publishes: with no + # `publish:` input, once the Version PR is merged (a push with no pending changesets) the + # action simply no-ops. Publishing is the separate, manual step below. + - name: Open/update the "Version Packages" PR if: github.event_name == 'push' uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1 with: - version: npm run version # changeset version (opens the "Version Packages" PR) + version: npm run version # changeset version — manages the Version PR only + createGithubReleases: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Publish (manual, workflow_dispatch with publish=true): publish the already-versioned + # package to npm — main -> `latest`, v8 -> `v8` (via publishConfig.tag) — with git tag, + # GitHub release, and provenance, over the OIDC trusted publisher (no NPM_TOKEN). + # Merge the "Version Packages" PR first: this publishes only when there are no pending + # changesets. If any remain, the action safely opens/updates the Version PR instead. + - name: Publish to npm + if: github.event_name == 'workflow_dispatch' && inputs.publish + uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1 + with: publish: npm run release # changeset publish (honors publishConfig.tag per branch) createGithubReleases: true env: