You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make cutting a version tag → CI publishes, not a manual npm publish. Establish a 1:1 chain: git tag vX.Y.Z ↔ npm X.Y.Z ↔ CHANGELOG [X.Y.Z] ↔ GitHub Release vX.Y.Z.
Builds on #35 (test CI) — the release workflow should run the test suite as a gate once that lands.
Proposed .github/workflows/release.yml
name: Releaseon:
push:
tags: ['v*']permissions:
contents: write # create the GitHub Releasejobs:
release:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4with:
node-version: 20registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm test --if-present # becomes a hard gate after #35
- run: npm publish --access publicenv:
NODE_AUTH_TOKEN: \${{ secrets.NPM_TOKEN }}
- name: GitHub Release from CHANGELOGrun: gh release create \"\$GITHUB_REF_NAME\" --title \"\$GITHUB_REF_NAME\" --notes-file release-notes.mdenv:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
(Extract the matching CHANGELOG section into release-notes.md in a prior step — or adopt release-please to auto-open a release PR that bumps the version + CHANGELOG and tags on merge.)
Prerequisites
Add NPM_TOKEN repo secret (npm automation token)
Guard step: fail if tag version ≠ package.json version
Decide: manual npm version + tag vs release-please
Acceptance criteria
Pushing a vX.Y.Z tag publishes to npm and creates the matching GitHub Release with CHANGELOG notes
Activity