Repository navigation
fix(release): stamp real version into ct-cli.tgz release asset - #85
Merged
Merged
Conversation
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
4 of 10 tasks
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.
Problem
The
buildjob packsrelease/ct-cli.tgzvianpm packbefore semantic-release bumps the version, so the attached tarball always carried the placeholder0.1.0. Now that@semantic-release/npmpublishes the real computed version to GitHub Packages (#83), the two npm-install paths diverged (#84):@eqrm/ct-cli@<real version>✅ct-cli.tgz(perINSTALL.md/README):@eqrm/ct-cli@0.1.0❌Fix (issue option 1, keeping the stable URL)
@semantic-release/execafter@semantic-release/npmin.releaserc.json. ItsprepareCmdruns once the npm plugin has written the bumped version intopackage.json, sonpm packnow produces a correctly-versioned tarball. It is renamed back to the fixedct-cli.tgzfilename that the stablereleases/latest/download/ct-cli.tgzURL depends on — no consumer-facing URL change.buildjob, so exactly one, correctly-versioned tarball exists.-p @semantic-release/exec@6to thenpxinvocation inrelease.yml.Notes
ci.yml) is unaffected. The new behaviour only exercises during an actual release run onmain.--versionis separately hardcoded to0.0.0insrc/index.ts(not read frompackage.json); tracked separately, not part of this asset-divergence fix.Closes #84