This project cuts releases from the version field in package.json.
Every push to main compares that version against the latest vX.Y.Z tag:
- Newer than latest tag → create a GitHub Release and dispatch npm publishing.
- Equal to latest tag → fail with a clear "already released" error.
- Older than latest tag → fail with a revert warning.
There is no commit-message marker, no manual tag push, and no release-please bot.
Note: v0.3.1 is the first version released end to end through this path. Watch that run before trusting it unattended.
- In your PR, bump the
versionfield inpackage.jsonto a not-yet-released semver (mise run versionbumps the patch;--bump minor/--bump majorfor the rest). - Merge to
main.
.github/workflows/release.yml creates the GitHub Release
(gh release create --target, with --generate-notes), then dispatches
publish-as-is.yml for npm OIDC trusted publishing. The
dispatch carries the released commit SHA, so the published tarball is built from exactly that
commit even if main has moved on.
npm provenance on a repository_dispatch run attests GITHUB_SHA (default-branch HEAD), not
the payload ref. If main has moved, publish-as-is.yml fails rather than attesting the wrong
commit. Re-run it via workflow_dispatch on the vX.Y.Z tag (or on that commit) so checkout
and provenance agree.
The GitHub Release is created in release.yml before npm publish runs. A later publish failure
leaves a tag/release for a version that is not on npm, and the next push of that same version
fails with "already released". Do not bump just to retry.
- Re-run
publish-as-is.ymlviaworkflow_dispatchon the release tag. That publishespackage.json's version from that commit. - If the published tarball is wrong, bump to a new version in a follow-up PR and merge; the gate will cut a new GitHub Release and dispatch publish again.
This project uses NPM Trusted Publishing with GitHub Actions. No npm tokens are needed — authentication is handled automatically via OIDC.
Trusted publisher configuration:
- Workflow filename:
publish-as-is.yml(notpublish.yml)
When a release succeeds, the publish workflow:
- Builds the module (
mise run build) - Publishes to npm with OIDC authentication (
mise run publish)
Before automated publishes work, the package must exist on npmjs.com and trusted publishing must be configured. See npm's Trusted Publishers docs.
Release notes come from gh release create --generate-notes (merged PRs/commits since the last
tag). CHANGELOG.md is frozen as of v0.3.0 and is no longer updated.