Skip to content

Release: require the npm environment, a tag on main, and the CI checks - #15

Merged
qisthidev merged 3 commits into
mainfrom
k3/release-gate
Nov 8, 2026
Merged

qisthidev merged 3 commits into
mainfrom
k3/release-gate

Conversation

@qisthidev

@qisthidev qisthidev commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Draft: waiting for a maintainer decision. This changes the release process.

release.yml:

  • environment: npm on the publish job, plus concurrency: release, and id-token: write scoped to the job.
  • Publishes with npm trusted publishing (OIDC). No NPM_TOKEN is read; provenance is attached as before.
  • Fails if the tagged commit is not an ancestor of origin/main.
  • Runs the unit tests and the dist-matches-build check (the same as ci.yml) before publishing.
  • Publishes with --ignore-scripts: dist is built and checked earlier, so prepack does not run again.
  • Checkout uses persist-credentials: false.

Before merging, an owner has to do this:

  1. Repository settings: create the npm environment with required reviewers, restricted to v* tags.
  2. npmjs.com, package settings: add a trusted publisher for GitHub Actions, laravolt/volt-preline, workflow release.yml, environment npm, with "Allow npm publish" selected.

The trusted publisher expires unless it publishes within 2 days, so the next release (0.3.2) follows right after the merge. After that release succeeds, delete the NPM_TOKEN repository secret and revoke the token on npmjs.com.

🤖 Generated with Claude Code

https://claude.ai/code/session_016ZbncuXneGAhsgTaizfjVi

qisthidev and others added 3 commits November 7, 2026 11:04
The publish job now runs in the `npm` environment (reviewers + the
NPM_TOKEN secret are configured there), rejects tags whose commit is
not on main, runs the unit tests and the dist check before publishing,
and publishes with --ignore-scripts after its own build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZbncuXneGAhsgTaizfjVi
@qisthidev qisthidev mentioned this pull request Nov 8, 2026
@qisthidev
qisthidev marked this pull request as ready for review November 8, 2026 02:44
@qisthidev
qisthidev merged commit 8bbc11f into main Nov 8, 2026
4 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.

1 participant