@mitresthen/excelents publishes to npm automatically when a GitHub Release
is published. Auth is npm Trusted Publishing (OIDC) — there is no NPM_TOKEN
secret to manage.
-
Be on
masterwith a clean tree and CI green. -
Update
CHANGELOG.md: retitle the[Unreleased]section to the new version + date, start a fresh empty[Unreleased], and update the compare links at the bottom. Commit. -
Bump the version — this also rewrites the
versionexport insrc/index.ts(via theversionnpm script →scripts/sync-version.mjs) and commits + tags:npm version patch # or: minor | major -
Push the commit and the tag:
git push --follow-tags
-
Create a GitHub Release for the new
vX.Y.Ztag (gh release create vX.Y.Z --generate-notes, or the web UI).
Publishing the release triggers .github/workflows/publish.yml, which reinstalls,
verifies the tag matches package.json, runs the tests + build, and
npm publishes with provenance. Watch the run under the repo's Actions tab.
- The npm org
mitresthenexists and the package name is published once (a trusted publisher can't be configured on a package that doesn't exist yet). - On npmjs.com → the package → Settings → Trusted Publishing, add a GitHub
Actions publisher pointing at this repo and
.github/workflows/publish.yml.
Once that's in place, every published GitHub Release ships a new version.