- Push the current repository history to
aieditor-team/aieditoron GitHub and makemainthe default branch. - Create a protected GitHub Environment named
npmfor the publish job. - On npmjs.com, add a trusted publisher for the
aieditorpackage with repositoryaieditor-team/aieditor, workflowrelease.yml, and environmentnpm. - Do not configure an
NPM_TOKEN; the workflow publishes through GitHub OIDC. - Require the CI workflow to pass before changes can merge into
main. - Enable private vulnerability reporting and CodeQL code scanning for the GitHub repository.
- Update
package.jsonandpackage-lock.jsonto the release version. - Move the matching changelog section out of
Unreleasedand add the release date. - Run
npm ci,npm run ci, andnpm publish --dry-runwith the Node.js version in.nvmrc. - Commit the release preparation and merge it into
main. - Create and push tag
v<package version>from that commit. Do not move or reuse a published tag. - Wait for the
Publish npmworkflow to succeed and verify the version on npmjs.com. - Create the GitHub Release for the same tag only after npm publication succeeds.
The tag push starts the release workflow. It verifies that the tag is exactly v<package version> and that the
tagged commit is contained in main. Prerelease versions publish under the npm next tag; stable versions publish
under latest. npm provenance is attached automatically.
The workflow intentionally publishes with lifecycle scripts disabled after npm run ci has built and verified the exact package contents. This prevents a second build from producing artifacts different from those already tested.
If the workflow fails before npm publication, fix the cause and publish a new version from a new tag. npm versions are immutable; never overwrite a version that reached the registry. A GitHub Release is deliberately not created by the workflow so a failed npm publication cannot leave a public release that points to an unavailable package.