fix(ci): skip publish when the version is unchanged, and tag releases - #60
Merged
Conversation
Publish runs on every push to main and unconditionally calls `npm publish`, so any merge that does not bump the version fails the run with: npm error You cannot publish over the previously published versions: 4.0.2. That just happened twice, on #52 and #58. The noise matters: a permanently red publish job is how blindpay-cli's genuinely broken publish went unnoticed for two and a half months and left npm three versions behind. This adds the same version guard already merged into blindpay-cli and blindpay-mcp, so an unchanged version is a no-op instead of a failure. Also tags and creates a GitHub release on publish. This repo has published up to 4.0.2 on npm and has zero git tags, so there is currently no way to see what shipped in a release from the repo alone. Two notes, neither addressed here: - `.changeset/` has around 20 accumulated changeset files and no workflow consumes them, so version bumps are effectively manual edits to package.json. Worth either wiring up `changeset version` or dropping changesets. - main currently carries the #52 and #58 fixes at an unbumped 4.0.2, so they are unreleased. The next version bump ships them. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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
publish.yamlruns on every push tomainand unconditionally callsnpm publish, so any merge that does not bump the version fails the run:That just happened twice, on #52 and #58.
The noise is the actual risk here. A permanently red publish job is exactly how
blindpay-cli's genuinely broken publish went unnoticed for two and a half months, leaving npm three versions behind whilemainmoved on. A job that is always red tells you nothing when it breaks for real.Changes
blindpay-cli(Add new endpoint for swift code check #19) andblindpay-mcp(Add rtp bank account method #9), so the three TypeScript-side repos now behave identically.4.0.2on npm and has zero git tags, so there is no way to tell from the repo alone what shipped in any release.ref: ${{ github.head_ref }}, which is empty on apushevent.Authentication is unchanged: this repo already publishes via npm trusted publishing (OIDC), which is why
@blindpay/node@4.0.2carries SLSA provenance attestations. The comment added above the publish step records whyNODE_AUTH_TOKENmust not be reintroduced, since adding it is what broke cli.Verification
publish.yamlparses as valid YAML. The guard logic is identical to the two already merged and verified: both@blindpay/cli@0.4.0and@blindpay/mcp@1.5.0published successfully through it, with provenance.Out of scope, but worth flagging
.changeset/holds roughly 20 accumulated changeset files and no workflow consumes them.main.yamlonly runs lint, typecheck, tests and snyk. So version bumps are in practice manual edits topackage.json, and the changesets are dead weight. Worth either wiring upchangeset versionor removing changesets.maincurrently carries the Handle empty JSON responses #52 and [Snyk] Upgrade svix from 1.89.0 to 1.94.0 #58 fixes at an unbumped4.0.2, so both are unreleased. The next version bump ships them.https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs