Releasing
Before release
Preview the version and release notes with release-it and --dry-run. If an upgrade requires code or configuration changes, describe them in the changelog.
npm Trusted Publishing
Register the GitHub owner, repository, filename of the workflow calling publish.yml and matching GitHub environment with npm. In package.json, repository must match the public repository, including case.
For a subpackage, point setup.working-directory at the package directory. You can also record its location in package.json with repository.directory. npm.tag-prefix defaults to v. Set it only if your tags use another prefix, such as widget@.
A root package uses the default working directory. See the monorepo example for a package subdirectory, an isolated installation test and package-scoped tags.
Release sequence
- Push the tag. From a clean worktree with push access to the tracked remote, rerun release-it without
--dry-run. It commits the version and changelog, creates the tag and pushes. - Verify the commit. Run full project checks on the tagged SHA or reuse a successful full CI run for it.
CHANGELOG.mdmust contain exactly one nonempty section for the version. - Publish to npm (if configured). CI packs with pnpm or npm. If
tarball-verify-commandis set, it tests the archive atTARBALL. CI publishes that archive using OIDC. - Create the GitHub Release. Use the tagged changelog and verify any configured assets before publication. If npm is configured, wait for it to succeed.
Protect release tags and use tag pushes as the only automatic publication trigger. To update a site alongside a stable release, see deployment policy.
GitHub Release assets
- For notes alone, set
"github-release": {}. Notes come from the trackedCHANGELOG.mdinsetup.working-directory. Tags default tovplus SemVer. Standalone releases can setgithub-release.tag-prefix. npm projects inheritnpm.tag-prefix. - Use
check.ymlwithtask: artifact,artifact.kind: release-assetsand the default componentapp. Custom jobs can sign files and upload their directory withartifact-packandkind: release-assets. List the top-level filenames ingithub-release.assets, preserving case. - In the same run, pass the returned
artifact-idtopublish.ymlasrelease-artifact-id. The workflow verifies the source and digest, uploads to a draft, then checks GitHub’s SHA-256 values before making the Release public. Omitrelease-artifact-idwhen there are no assets.
An explicit list, including [], must match the published assets exactly. If an npm project omits the list, reruns preserve assets the project added. See the downloads tag workflow.
Failure recovery
If the npm outcome is uncertain, verify the registry and provenance first. A missing receipt or temporary 404 does not justify republishing.
| Symptom | Next action |
|---|---|
| Local release-it stopped halfway | Inspect the worktree, local and remote tags, and their SHAs. If the tag was pushed, inspect the original run and keep the tag and version. |
| Source, repository identity or tarball verification failed | Correct and revalidate the candidate. Match package.json repository to the actual GitHub repository, including case. |
| A check failed transiently | Select Re-run failed jobs on the original run. |
| npm succeeded, GitHub Release failed | Rerun only the Release job and resume its matching draft. For manual recovery, verify the package name, version, tag SHA and each asset digest. Keep the original notes and prerelease flag. Stop on a conflicting Release. |
| Receipt missing or upload failed | Check npm logs, registry and provenance. Once publication is confirmed, recover only the missing GitHub Release. See npm publication results. |
| GitHub Release succeeded, docs deployment failed | Rerun deployment with the original artifact. If it expired, confirm the stable tag and SHA, rebuild from that SHA with a compatible toolkit version and deploy in the same run. |
Adopt the workflows
Run a pnpm or npm project's tests on pull requests with read-only repository access.
Deploy a site or Worker
A site built on main can deploy as soon as its build succeeds. To tie deployment to a stable release, make it depend on both jobs (needs: [build_site, publish] in the monorepo example) and pass the tag as release-tag. Monorepo workflows