Skip to content

ci: set up automated releases with Changesets - #3

Merged
quuu merged 2 commits into
mainfrom
tomknickman/setup-changesets
Jul 9, 2026
Merged

quuu merged 2 commits into
mainfrom
tomknickman/setup-changesets

Conversation

@tknickman

@tknickman tknickman commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Sets up automated, reviewable releases using Changesets, following the pattern in vercel/repository-dispatch, adapted for this single package and for npm OIDC trusted publishing.

  • .changeset/config.json — Changesets config (public access, main base branch).
  • package.json — adds changeset, version-packages, and release (pnpm build && changeset publish) scripts; adds @changesets/cli; pins packageManager to pnpm@10.9.0.
  • .github/workflows/release.yml — on push to main, changesets/action opens/updates a "Version Packages" PR or, when that merges, publishes to npm. Publishes via OIDC trusted publishing (id-token: write) — no npm token.
  • A first changeset (patch) documenting this change.

npm OIDC requirements (met in this PR)

  • Workflow filename is release.yml — must exactly match the workflow the npm trusted publisher is configured to trust (OIDC validates the filename).
  • Node 24 + npm install -g npm@latest — npm trusted publishing requires npm ≥ 11.5.1 and Node ≥ 22.14; Node 22 ships npm 10.x, so we upgrade explicitly.

Prerequisites (owner action, outside this PR)

  • ✅ npm trusted publisher configured for vercel/detect-agent → release.yml (done by the package owner).
  • ⚠️ Repo secret GH_TOKEN_PULL_REQUESTS — a PAT / GitHub App token with contents:write + pull-requests:write, so the version PR can be opened and trigger CI. Still required.

Verification

  • pnpm install --frozen-lockfile, lint, format:check, test (68), build all pass.
  • Dry-ran pnpm version-packages: bumped 1.0.0 → 1.0.1 and wrote CHANGELOG.md, then reverted.
  • Real publish validates on first merge to main.

🤖 Generated with Claude Code

Add Changesets config, release scripts, and a Release Packages workflow that opens a version PR and publishes to npm with OIDC provenance on merge to main.
@socket-security

socket-security Bot commented Jul 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
Addednpm/​@​changesets/​cli@​2.31.09710010095100
Addedgithub/​changesets/​action@​a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d96100100100100

View full report

…ents

- Rename release-packages.yml -> release.yml to match the workflow filename the npm trusted publisher is configured to trust; OIDC validates the exact filename.
- Bump Node to 24 and upgrade npm to latest, since npm OIDC trusted publishing requires npm >= 11.5.1 (Node 22 bundles npm 10.x).
@quuu
quuu merged commit 4224b7a into main Jul 9, 2026
6 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