Skip to content

ci(publish): fix pnpm setup, fail fast on missing tag - #42

Merged
erubboli merged 1 commit into
mainfrom
ci/publish-hardening
Nov 5, 2026
Merged

erubboli merged 1 commit into
mainfrom
ci/publish-hardening

Conversation

@erubboli

@erubboli erubboli commented Nov 5, 2026

Copy link
Copy Markdown
Member

Summary

Two fixes to the Publish workflow:

  1. Install pnpm step fails on current main. Since packageManager: pnpm@10.15.0 was added to the root package.json, pnpm/action-setup aborts with "Multiple versions of pnpm specified" because the workflow also passed version: 10. The explicit version: input is removed so the action derives pnpm from packageManager. This blocked the sdk-v1.1.1 publish run 42012986263 at step 5, after checkout and the version check had already passed.
  2. Fail fast on a missing release tag. The Oct 28 dispatch passed tag=sdk-v1.1.2, which does not exist on origin; checkout then spent ~23s in three git fetch retries before failing with a bare "git failed with exit code 1". The derive step now trims the input and checks git ls-remote --exit-code for refs/tags/$TAG before proceeding, so a wrong tag name fails in ~2s with a clear message.

Test plan

  • YAML validated
  • CI green on this PR (workflow-only change)
  • Next Publish dispatch for sdk-v1.1.1 passes Install pnpm and completes through Stage publish

Remove the explicit version: 10 from pnpm/action-setup; pnpm is now derived from packageManager (pnpm@10.15.0) in package.json. The duplicate specification made the action abort with Multiple versions of pnpm specified, which blocked the sdk-v1.1.1 publish run (42012986263) at Install pnpm after checkout and the version check had already passed.

Also trim the tag input and verify the release tag exists on origin (git ls-remote --exit-code) in the derive step, so a wrong tag name fails in about 2 seconds with a clear message instead of three git fetch retries ending in a bare git exit-code-1 error (the Oct 28 dispatch used tag sdk-v1.1.2, which does not exist).
@erubboli
erubboli merged commit 98d4de1 into main Nov 5, 2026
1 check passed
@erubboli
erubboli deleted the ci/publish-hardening branch November 5, 2026 10:48
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