Repository navigation
take the release version from the tag - #53
Merged
Merged
Conversation
Publishing a GitHub release with the tag v<version> is enough to release: the release check takes the version from the tag (instead of requiring package.json to match it), npm, JSR and the docs are built with it, and for regular releases a final job commits it to the default branch on top of whatever was merged since, so package.json there shows the latest release. Prereleases and fixes for older majors leave the branch alone. scripts/version.js sets the version and keeps its copies (jsr.json, src/version.ts) in sync; the build and `npm version` use it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ljnxm1Qjrocq1izGajLx8J
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releasing no longer needs a version bump commit beforehand: publishing a GitHub release with the tag
v<version>is enough, and the workflow commits the version back tomasterafterwards.How a release works now
## <version>, which stays mandatory, and merge it.v<version>, marked as prerelease for versions like3.2.0-rc.1.release.ymlthen:v+ valid semver, newer than what npm has, not on JSR yet, listed in the changelog, with a matching prerelease flag. It outputs the version and the npm dist-tag.scripts/version.js) and publishes to npm with provenance.latest). It checks out the current default branch, sets the version and commits "release " asgithub-actions[bot].masteralone.GITHUB_TOKENdon't trigger other workflows, so there's no loop.masterhas no branch protection, so the push goes through.The tag points at the commit before the version commit; that can't be avoided. The published npm/JSR packages and the docs carry the right version anyway, because each job sets it before building.
Changes
scripts/version.js(new): sets the version inpackage.jsonand keeps its copies in sync (jsr.json,src/version.ts, which is the version written into PNG metadata). The build and thenpm versionlifecycle script use it too.scripts/release-check.js: takes the version from the tag instead of requiringpackage.jsonto match it.jsr.ymlanddocs.yml: optionalversioninput, whichrelease.ymlpasses. Run by hand, they keep the version in the repository.