ci: resolve pnpm catalog: deps in release + test workflows#22
Open
John-David Dalton (jdalton) wants to merge 1 commit into
Open
ci: resolve pnpm catalog: deps in release + test workflows#22John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
release.yml (the tag-triggered publish) and its test.yml workflow_call
gate both installed dependencies with a bare `bun install`, which cannot
resolve this repo's pnpm `catalog:` dependencies ("@<pkg>@catalog: failed
to resolve"). Both workflows were therefore broken.
Swap the bare `bun install` for the fleet `setup-and-install` composite
(provisions node + pnpm, installs via pnpm, resolves catalog:), mirroring
the working install path in ci.yml. Keep the existing `oven-sh/setup-bun`
step (same pinned SHA) so `bun test`, `bun add`, and the npm-provenance
bootstrap still have bun on PATH. Leave the publish/OIDC/tag logic and the
workflow_call gate wiring untouched. Pass `checkout: false` because the
existing actions/checkout step already populates the workspace (which is
also what lets GitHub resolve the local `./` action).
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.
Warning
Do not merge without review. This touches release-critical publishing workflows. No publish, tag, or release was triggered by this PR — it only changes how two workflows install dependencies. John-David Dalton (@jdalton) reviews before merge.
What was broken
The tag-triggered release pipeline was non-functional.
.github/workflows/release.yml(publish onv*.*.*tag push) uses.github/workflows/test.ymlas itsworkflow_callpre-release gate (needs: test). Both workflows installed dependencies with a barebun install, which cannot resolve this repo's pnpmcatalog:dependencies — it fails with@<pkg>@catalog: failed to resolve. So the gate could never pass and the release job could never install.The fix
Both workflows now install the same way the already-working
ci.ymldoes: via the fleet composite action./.github/actions/fleet/setup-and-install, which provisions node + pnpm and installs through pnpm (resolvingcatalog:). The existingoven-sh/setup-bunstep is kept (same pinned SHA22457c87…) sobun test,bun add, and the npm-provenance bootstrap still have bun on PATH.Exact changes (2 files, install step only)
.github/workflows/test.yml— replaced- run: bun installwith- uses: ./.github/actions/fleet/setup-and-install(checkout: false,socket-api-token: ${{ secrets.SOCKET_API_KEY }}). Thebun testand "Test blocking on install" (bun add lodahs) steps are unchanged..github/workflows/release.yml— replaced- run: bun installwith the same composite (checkout: false,socket-api-token: ${{ secrets.SOCKET_API_TOKEN_FOR_CLI_AND_SFW }}). The checkout, setup-bun,bun install -g npm@latest, andnpm publish --provenancesteps are unchanged.checkout: falseis passed because each job already has anactions/checkoutstep that populates the workspace (which is also what lets GitHub resolve the local./action), so the composite's own checkout would be redundant.The
workflow_callgate wiring (release.yml→test.yml,needs: test) and all publish/OIDC/tag logic are left untouched, per the task scope.test.ymlis not deleted.How I verified (without triggering a release)
Verification results
yaml.safe_loadandactionlint. My changes introduce zero newactionlintwarnings. (One pre-existingactionlintwarning remains ontest.yml's "Run tests" env linesecrets.SOCKET_API_TOKEN, present onmainbefore this PR and not touched here.).github/actions/fleet/setup-and-install/action.ymlis present and declares thecheckoutandsocket-api-tokeninputs I use.oven-sh/setup-bun@22457c87c1b161cf7dde222c3e82b2b5f8d2bed2is byte-identical acrossci.yml,test.yml, andrelease.yml.pnpm-lock.yamlis committed, andci.ymlalready installs the same way and is green. The pre-commit hook in this branch also ran a full pnpm install (356 packages, catalog resolved) andbun test(47 pass, 0 fail).release.ymlfires onpush: tags: v*.*.*→testjob runstest.ymlviaworkflow_call→releasejob hasneeds: test, so publish still runs only after the gate passes.Only a real tag push can exercise: the actual
v*.*.*trigger on GitHub runners, the composite resolving./afteractions/checkouton a detached tag ref, and the npm OIDC provenance publish. These were reasoned through but not executed.release.ymlpublish successfullyWhile fixing the install I found that
release.ymlhas further, independent blockers outside this PR's scope (the task was explicit: fix the install only, do not change publish/OIDC/tag logic). John-David Dalton (@jdalton) should decide the direction before relying on this path:Details
prepublishOnlyguard blocks rawnpm publish.package.jsonhas"prepublishOnly": "echo 'ERROR: Use GitHub Actions workflow for publishing' && exit 1".release.yml'snpm publish --provenancerunsprepublishOnly→exit 1→ fails. The fleet publish path (scripts/fleet/npm-publish.mts) is designed to bypass this; rawnpm publishis not.dist/is gitignored.**/dist/is not tracked, andrelease.ymlhas no build step, so the publishedmain/types/exportstarget would be missing.ci.ymland the fleet publish both runpnpm run buildfirst.release.ymlappears superseded by a full fleet-canonical release system already in the repo:npm-publish.yml(staged OIDC publish),github-release.yml(cuts the GH release — and it also fires onpush: tags: v*, overlappingrelease.yml), andrelease-reconcile.yml(tag-gap healer).test.ymlis referenced only byrelease.yml.Recommendation: consider retiring
release.yml(andtest.yml, if unused elsewhere) in favor of the fleet system rather than repairing the legacy path. That is a larger, publish-touching change and is deliberately left out of this PR.