Skip to content

fix(ci): release publish never ran; fail closed on an unpublished version - #24

Merged
soydachi merged 1 commit into
mainfrom
fix/release-publish-never-ran
Aug 28, 2026
Merged

fix(ci): release publish never ran; fail closed on an unpublished version#24
soydachi merged 1 commit into
mainfrom
fix/release-publish-never-ran

Conversation

@soydachi

Copy link
Copy Markdown
Member

Problem

The post-merge release workflow on main reported success while publishing nothing: no git tag, no GitHub release, no npm package (npm view @arcasilesgroup/ai-shell → 404). Every future release would silently no-op the same way.

Cause

changesets/action executes publish-script as argv, without a shell. The configured npm run build && npx changeset publish therefore ran as:

npm run build "&&" "npx" "changeset" "publish"

The trailing tokens were swallowed as arguments to the build script (visible in the runner banner: > pkgroll && npx changeset publish, then ~0.6 s of pkgroll and nothing else). changeset publish never executed, the ndjson the action reads for tags/releases was never produced — and the action runs scripts with ignoreReturnCode: true, so the step, job, and workflow all reported success. Reproduced locally by invoking the exact same argv shape through execa.

Fix

  • Build in its own step; publish-script: npx changeset publish is a single command the argv split cannot mangle.
  • New post-release step: the version in package.json must exist on the registry. A green release job that published nothing now fails the job (fail-closed, per the repo's own "each one passes with a command rather than an assertion" rule).

Verification

  • actionlint + prettier --check on the workflow — green.
  • Local proof of the argv mechanism: npm run build "&&" npx changeset publish in a scratch package executes the build script only; publish is never invoked.
  • After merge: pushing this to main re-runs release on the v0.1.1 tree, which should now tag @arcasilesgroup/ai-shell@0.1.1, create the GitHub release, and publish 0.1.1 to npm via OIDC trusted publishing. If the trusted-publisher registration for this repo + release.yml + environment npm is missing on npmjs.com, the publish step fails loudly (exit 1: "no OIDC tokens found for publishing" / provenance error) — the new registry check proves the outcome either way.

…sion

changesets/action executes publish-script as argv without a shell, so
'npm run build && npx changeset publish' ran as 'npm run build' with the
trailing tokens swallowed as script arguments. 'changeset publish' never
executed, no ndjson was produced, and ignoreReturnCode let the job
report success without publishing: main 0.1.1 shipped with no tag, no
GitHub release, no npm package.

- build in its own step; publish-script is one command now
- add a post-release check that the version in package.json exists on
  the registry, so a silent no-publish fails the job
@soydachi
soydachi merged commit c70399d into main Aug 28, 2026
4 checks passed
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