Skip to content

ci: combine release workflows into a single file for trusted publishing#2345

Merged
amannn merged 1 commit into
canaryfrom
combine-release-workflows
Jun 5, 2026
Merged

ci: combine release workflows into a single file for trusted publishing#2345
amannn merged 1 commit into
canaryfrom
combine-release-workflows

Conversation

@amannn

@amannn amannn commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Why

npm Trusted Publishing is configured against a single workflow file, but releases were split across two: release.yml (stable) and prerelease-canary.yml (canary). This merges them into one release.yml so both stable and canary can publish via Trusted Publishing.

What

release.yml now triggers on pushes to both main and canary, with two branch-gated jobs — only the one matching the pushed branch runs:

Job Branch Publishes
stable main pnpm run publishlatest
canary canary lerna publish 0.0.0-canary-<sha> --dist-tag canary
  • Gating is if: github.ref == 'refs/heads/main' / 'refs/heads/canary', so a push only ever runs one of them.
  • Each job keeps its existing publish condition (commit message starts with fix: / feat: / feat!: ).
  • The canary job now publishes via Trusted Publishing too (id-token: write, npm install -g npm@latest), dropping NODE_AUTH_TOKEN / NPM_TOKEN to match the stable job.
  • prerelease-canary.yml is removed.

Trusted Publishing for the packages should now point at release.yml.

npm Trusted Publishing can only be configured against a single workflow
file, so merge `prerelease-canary.yml` into `release.yml` as two
branch-gated jobs:

- `stable` runs on `main` and publishes the `latest` dist-tag
- `canary` runs on `canary` and publishes the `canary` dist-tag

Only the job matching the pushed branch runs (`if: github.ref == …`). The
canary job now publishes via Trusted Publishing as well, dropping the
`NPM_TOKEN` / `NODE_AUTH_TOKEN` to match the stable job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
next-intl-docs Ready Ready Preview, Comment Jun 5, 2026 1:58pm
next-intl-example-app-router Ready Ready Preview, Comment Jun 5, 2026 1:58pm
next-intl-example-app-router-without-i18n-routing Ready Ready Preview, Comment Jun 5, 2026 1:58pm

Request Review

@amannn amannn changed the base branch from main to canary June 5, 2026 14:06
@amannn amannn merged commit f3e0acd into canary Jun 5, 2026
7 checks passed
@amannn amannn deleted the combine-release-workflows branch June 5, 2026 14:06
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.

1 participant