Repository navigation
Publish from a tag on main, taking the version from the tag - #46
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 took two steps that did two different things: a PR to bump
package.json, then a tag to publish. Now the tag alone is the release.To release, tag a commit on main and push the tag:
What changes in
publish.yml:origin/mainfails before anything runs. Checkout now usesfetch-depth: 0soorigin/mainis there to compare against.npm version <tag> --no-git-tag-versionwrites the tag's version intopackage.jsoninside the job, so the published tarball carries it. A tag that is not valid semver fails here.package.jsonversion is no longer bumped, so on a manual rehearsal run it would always be "already published".The repo's
package.jsonstays at 0.2.1 from here on; npm and/evolver-status(which reads the installed package's ownpackage.json) show the tagged version.Rehearsed with a manual run on this branch.
🤖 Generated with Claude Code
Note
Medium Risk
Changes npm publish gates and how version is chosen at release time; mistakes in tagging or the main-ancestor check could block or mis-version publishes, but duplicate-version and main-line checks limit exposure.
Overview
Release is now tag-driven: pushing a
v*tag on main publishes to npm; the repo’spackage.jsonversion is no longer bumped per release.The Publish workflow now fetches full git history (
fetch-depth: 0), rejects tags whose commit is not onorigin/main, and sets the package version from the tag vianpm versionin the job (replacing the old check thatpackage.jsonhad to match the tag). The “already on npm” guard runs only on tag pushes so manualworkflow_dispatchrehearsals don’t fail against the stale manifest version.Manual runs still build and test without publishing.
Reviewed by Cursor Bugbot for commit beb52fd. Bugbot is set up for automated code reviews on this repo. Configure here.