Repository navigation
ci(publish): take the npm package version from the release tag - #84
Merged
Merged
Conversation
The publish workflow failed for v0.7.0 because package.json still said 0.6.0. Instead of requiring a version-bump PR before each release, derive the version from the GitHub Release tag and stamp it into the packaged copy of the source before npm pack. The checkout itself is left untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Why
The v0.7.0 publish run failed because the release tag was
v0.7.0butpackage.jsonstill said0.6.0, so the tag/version check stopped it.What
v<semver>, prereleases included; any other tag fails the run.npm version <tag version> --no-git-tag-versionin thegit archivecopy right beforenpm pack. The checkout itself stays untouched, so the "build did not modify the checkout" check still passes.package.jsoncheck and the version-bump PR step from CONTRIBUTING.md.Testing
v0.7.0,v1.0.0-rc.1,v1.0.0+build.5; rejects0.7.0,v0.7,vfoo.git archive+npm version 0.7.0+npm pack --dry-run, which producedmozilla-ai-pi-otari-0.7.0.tgz.Note on v0.7.0
A re-run of the failed workflow uses the workflow file at the tagged commit, so it will fail again. After merging, delete the v0.7.0 release and tag, then publish it again from the new
main.🤖 Generated with Claude Code