Skip to content

fix(release): stamp real version into ct-cli.tgz release asset - #85

Merged
2000game merged 1 commit into
mainfrom
fix/release-tarball-version-84
Jul 11, 2026
Merged

2000game merged 1 commit into
mainfrom
fix/release-tarball-version-84

Conversation

@2000game

Copy link
Copy Markdown
Member

Problem

The build job packs release/ct-cli.tgz via npm pack before semantic-release bumps the version, so the attached tarball always carried the placeholder 0.1.0. Now that @semantic-release/npm publishes the real computed version to GitHub Packages (#83), the two npm-install paths diverged (#84):

  • GitHub Packages: @eqrm/ct-cli@<real version> ✅
  • GitHub Release ct-cli.tgz (per INSTALL.md/README): @eqrm/ct-cli@0.1.0 ❌

Fix (issue option 1, keeping the stable URL)

  • Add @semantic-release/exec after @semantic-release/npm in .releaserc.json. Its prepareCmd runs once the npm plugin has written the bumped version into package.json, so npm pack now produces a correctly-versioned tarball. It is renamed back to the fixed ct-cli.tgz filename that the stable releases/latest/download/ct-cli.tgz URL depends on — no consumer-facing URL change.
  • Remove the pre-bump pack step from the build job, so exactly one, correctly-versioned tarball exists.
  • Add -p @semantic-release/exec@6 to the npx invocation in release.yml.

Notes

  • No source changes; CI (ci.yml) is unaffected. The new behaviour only exercises during an actual release run on main.
  • Out of scope: the CLI's --version is separately hardcoded to 0.0.0 in src/index.ts (not read from package.json); tracked separately, not part of this asset-divergence fix.

Closes #84

The build job packed release/ct-cli.tgz via `npm pack` before
semantic-release bumps the version, so the attached tarball always
carried the placeholder 0.1.0 while GitHub Packages published the real
computed version — the two npm-install paths diverged (surfaced by #83).

Move the pack into the release job via @semantic-release/exec, which runs
after @semantic-release/npm writes the bumped version into package.json,
then rename the output back to the fixed ct-cli.tgz filename the stable
releases/latest/download/ct-cli.tgz URL depends on (README + INSTALL.md).
The pre-bump pack step in the build job is removed so exactly one,
correctly-versioned tarball is produced.

Closes #84
@2000game
2000game merged commit 8ee2cbc into main Jul 11, 2026
1 check passed
@2000game
2000game deleted the fix/release-tarball-version-84 branch July 11, 2026 08:27
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.

chore(release): GitHub Release ct-cli.tgz asset is pinned at 0.1.0 while GitHub Packages carries the real version

1 participant