package.jsonversion is updated (for example0.0.2).- npm Trusted Publishing is configured for
.github/workflows/release.yaml. - You have permission to push tags and create releases.
- Workflow runtime must use Node
24.xand npm11+.
- Push your release commit to
main. - Open GitHub Actions and run the
Releaseworkflow manually.
- Reads version from
package.jsonand sets tagv<version>. - Installs dependencies and runs tests.
- Fails if that version is already published on npm.
- Fails if tag
v<version>already exists. - Creates and pushes tag
v<version>on the current commit. - Creates a GitHub Release for that tag.
- Publishes the package to npm.
- Existing tag: workflow fails (no tag overwrite).
- Existing npm version: workflow fails (no duplicate publish).