Skip to content

ci: publish canary versions with trusted publishing - #501

Merged
feugy merged 2 commits into
9.xfrom
ci/trusted-publishing-9.x
Nov 9, 2026
Merged

feugy merged 2 commits into
9.xfrom
ci/trusted-publishing-9.x

Conversation

@feugy

@feugy feugy commented Nov 9, 2026

Copy link
Copy Markdown
Member

🖖 What's in there?

Lets the 9.x line publish canary versions to npm from GitHub Actions with npm Trusted Publishing (OIDC). There is no npm token, and every release gets a provenance attestation. This unblocks micro@9.3.5-canary.4 (#496, #499), which is tagged but not on npm.

  • .github/workflows/release.yml: a manual workflow. On 9.x, it publishes the current version under the canary dist-tag. It refuses versions without -canary. and skips versions already on npm.
  • packages/micro/package.json: replaces zeit/micro with the full repository of vercel/micro. npm requires repository.url to match the GitHub repository exactly.

🤺 How to test?

  1. Merge 500 first. GitHub only runs manual workflows whose file also exists on the default branch, and npm needs the Trusted Publisher (repository vercel/micro, workflow release.yml).
  2. Merge this PR, then run the workflow on 9.x:
    gh workflow run release.yml --repo vercel/micro --ref 9.x
  3. Check: npm view micro dist-tags shows canary: 9.3.5-canary.4, and latest is unchanged.

🔬 Notes to reviewers

  • No Changesets on 9.x: this 2019 Yarn branch only gets occasional canaries, and a version-bump PR plus a manual run is enough.
  • The file name must stay release.yml, like on main: npm binds the Trusted Publisher to one file name.
  • I tested the publish script locally with npm publish --dry-run: 9.3.5-canary.4 publishes with tag canary, 9.3.5-canary.3 is skipped as already published, and 9.3.4 is refused.

🔗 Related PRs

@socket-security

socket-security Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub/​actions/​setup-node@​49933ea5288caeca8642d1e84afbd3f7d68200208610010010080

View full report

@feugy
feugy requested a review from a team November 9, 2026 08:29
@feugy
feugy merged commit 7eabb15 into 9.x Nov 9, 2026
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