Skip to content

ci(publish): take the npm package version from the release tag - #84

Merged
tbille merged 1 commit into
mainfrom
ci/version-from-release-tag
Nov 18, 2026
Merged

tbille merged 1 commit into
mainfrom
ci/version-from-release-tag

Conversation

@tbille

@tbille tbille commented Nov 18, 2026

Copy link
Copy Markdown
Member

Why

The v0.7.0 publish run failed because the release tag was v0.7.0 but package.json still said 0.6.0, so the tag/version check stopped it.

What

  • Take the version from the GitHub Release tag. The tag must be v<semver>, prereleases included; any other tag fails the run.
  • Run npm version <tag version> --no-git-tag-version in the git archive copy right before npm pack. The checkout itself stays untouched, so the "build did not modify the checkout" check still passes.
  • Remove the tag-vs-package.json check and the version-bump PR step from CONTRIBUTING.md.

Testing

  • Regex tested under bash: accepts v0.7.0, v1.0.0-rc.1, v1.0.0+build.5; rejects 0.7.0, v0.7, vfoo.
  • Locally ran git archive + npm version 0.7.0 + npm pack --dry-run, which produced mozilla-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

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>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e78ed7e6-b31a-46f1-8ebc-c336f2a00411
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@tbille
tbille merged commit b56f8bc into main Nov 18, 2026
2 checks passed
@tbille
tbille deleted the ci/version-from-release-tag branch November 18, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant