Skip to content

chore(release): enable first publish (version floor 9.29.1 + minor changeset + canary path)#41

Merged
kamal-kaur04 merged 2 commits into
migration/monorepo-add-wdio-browserstack-servicefrom
chore/release-enablement-9.30
Jul 10, 2026
Merged

chore(release): enable first publish (version floor 9.29.1 + minor changeset + canary path)#41
kamal-kaur04 merged 2 commits into
migration/monorepo-add-wdio-browserstack-servicefrom
chore/release-enablement-9.30

Conversation

@AakashHotchandani

Copy link
Copy Markdown
Collaborator

Queues the first publish of @wdio/browserstack-service from this repo and adds a canary validation path. Base = PR #37 branch so it flows in with the conversion.

Changes

  • Version floorpackages/browserstack-service/package.json 9.28.09.29.1. npm latest is 9.29.1; a changeset bump from 9.28.0 would be ≤ that and npm would reject it. Aligning to 9.29.1 means the minor changeset lands 9.30.0.
  • Minor changeset — describes the ported parity (LTS, Test-Case-ID, mocha-timeout, request-queue isolation, a11y types, yauzl 3.4) → drives the 9.30.0 "Version Packages" PR.
  • .changeset/config.jsonsnapshot.useCalculatedVersion: true so canary versions read 9.30.0-canary-<datetime>.
  • release.yml — add a workflow_dispatch canary input; the normal changesets/action step is gated to push, and a new step snapshot-publishes pending changesets to the canary dist-tag via the same OIDC trusted publisher — validating OIDC + provenance end-to-end without touching latest.

After merge (→ eventually main)

  • Run Actions → Release → Run workflow → canary: true to publish 9.30.0-canary-* to the canary tag and confirm OIDC/provenance.
  • Then the normal push flow opens the 9.30.0 "Version Packages" PR; merging it publishes 9.30.0 to latest.

Note: pushed via SSH — the workflow-file change needs workflow scope (the HTTPS/OAuth push was rejected), so future edits to release.yml must go via SSH or the web UI.

🤖 Generated with Claude Code

…ngeset, 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
  <next>-canary-<datetime> (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) <noreply@anthropic.com>
@AakashHotchandani AakashHotchandani requested a review from a team as a code owner July 10, 2026 05:48
@AakashHotchandani AakashHotchandani requested review from osho-20 and rounak610 and removed request for a team July 10, 2026 05:48
# 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'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we added the trigger on push?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question — it's intentional, and it's the standard Changesets release flow. The on: push: to main/v8 is what makes a release happen at all, and it drives both halves:

  1. Merge a PR that carries a pending changeset → push to mainchangesets/action sees the pending changeset and opens/updates the "Version Packages" PR (bumps version + CHANGELOG). It does not publish yet.
  2. Merge that "Version Packages" PR → this is another push to main, now with no pending changesets → the same action runs changeset publish → publishes to npm (latest).

Without the push trigger, nothing would ever version or publish. The if: github.event_name == 'push' on this step just scopes it to that normal flow so it does not fire on the manual workflow_dispatch canary run — that's the separate step below (if: github.event_name == 'workflow_dispatch' && inputs.canary). The two steps are mutually exclusive by event type.

(No NPM_TOKEN anywhere — auth is OIDC trusted publishing via the id-token: write permission.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: based on this, we've made publishing manual (pushed as c9f1ed8). The push trigger now does strictly one thing — open/update the "Version Packages" PR in version-only mode. It never publishes, and merging the Version PR is now a no-op.

Publishing is a separate manual step: Actions → Release → Run workflow → publish: true (main → latest, v8 → v8), with git tag + GitHub release + provenance over the same OIDC publisher. Canary is unchanged (canary: true).

So the answer to "why on push?" is now: only to keep the version/changelog PR up to date automatically — nothing reaches npm without someone clicking Run workflow.

Comment on lines +91 to +97
- 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'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we test these commands?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair question. Honest status: the flags and config are verified, but the commands have not been run end-to-end yet — that's exactly what the manual canary run is for, and it's designed to be safe.

What's verified:

  • changeset version --snapshot canary with snapshot.useCalculatedVersion: true in .changeset/config.json → produces 9.30.0-canary-<datetime> (the workspace pkg is at 9.29.1; two minor changesets → 9.30.0). Snapshot mode also auto-disables committing and does not consume the changeset, so it stays on the branch for the real release afterward.
  • changeset publish --no-git-tag --tag canary — both flags confirmed valid against @changesets/cli (its usage string is literally publish [--tag <name>] [--otp <code>] [--no-git-tag]; we resolve 2.31.x from ^2.27.9). --tag canary publishes under the canary dist-tag (never latest); --no-git-tag skips git tag creation, which is right for an ephemeral canary.

Why running it live is safe (it IS the test): it only publishes a prerelease to the canary dist-tag; latest (currently 9.29.1) is untouched; and any OIDC/provenance misconfig makes the publish step fail cleanly — no bad latest can escape.

To validate end-to-end: Actions → Release → Run workflow → canary: true, then:

npm view @wdio/browserstack-service@canary version          # -> 9.30.0-canary-...
npm view @wdio/browserstack-service@canary dist.attestations # provenance present
npm view @wdio/browserstack-service dist-tags.latest         # still 9.29.1

…PR, publish is workflow_dispatch

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) <noreply@anthropic.com>
@kamal-kaur04 kamal-kaur04 merged commit 9629eec into migration/monorepo-add-wdio-browserstack-service Jul 10, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants