ci: pin npm to 11.x, move release-please to the GitHub App, gate publish on tests - #42
Merged
Merged
Conversation
…ish on tests
The npm publish step is broken right now, not at some future point.
`build.yml` sets up node 20 and then runs `npm install -g npm@latest`.
`npm@latest` is 12.0.2, whose engines are:
node: "^22.22.2 || ^24.15.0 || >=26.0.0"
Node 20 satisfies none of them, so the release path installs an npm that
cannot run on the node it was given. flowcore-sdk already hit this and
pinned 11.x; hono-api kept `@latest`.
Changes:
- Pin `npm@11`, with the engine constraint written down so the next
person does not "helpfully" restore `@latest`.
- Migrate release-please from the shared FLOWCORE_MACHINE_GITHUB_TOKEN
PAT to the Flowcore Release Bot App, matching the org migration that
skipped this repo. Both `RELEASE_PLEASE_APP_ID` and
`RELEASE_PLEASE_APP_PRIVATE_KEY` are org-scoped with visibility "all".
Adds `permissions: contents: read`, which the workflow lacked.
- Run the test suite before publishing. The release path linted only, so
a green PR was the last gate before npm and jsr.
- Add `typecheck` to the PR workflow. It was a deno task nothing called.
- Drop the third-party `sergeysova/jq-action@v2` for a one-line `jq`
call, removing an unpinned third-party action from three workflows.
- SHA-pin the remaining actions instead of floating tags, matching
flowcore-sdk.
Every CI step was run locally against this branch: install, build-npm,
lint, fmt --check, typecheck, and test (7 passed, 121 steps, 0 failed).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The publish path is broken right now
build.ymlsets up node 20, then runs:npm@latestis currently 12.0.2. Its engines:Node 20 satisfies none of those. The release job installs an npm that cannot run on the node the job just set up.
flowcore-sdkalready hit this and pinned 11.x, with the reason in a comment.hono-apiwas left on@latest.This matters immediately: release-please has 0.4.1 in flight carrying the JWKS fix from #41. On the
release: publishedevent this job runs, and the fix does not reach npm.This path has never survived a real release event
28750934156release: publishedv0.4.0npm error code ENEEDAUTH28751058175workflow_dispatchnpm error 404 PUT /@flowcore%2fhono-api … or you do not have permission28751437206workflow_dispatchv0.4.0 reached npm by manual retry, not by the pipeline.
Changes
1. Pin
npm@11— the fix for the above, with the engine constraint written into the comment so nobody restores@latest.2. Migrate release-please from the shared PAT to the Flowcore Release Bot App.
release-please.ymlstill usedsecrets.FLOWCORE_MACHINE_GITHUB_TOKEN. The org migration toactions/create-github-app-token— done to stop every repo sharing one PAT's 5k req/hr limit — skipped this repo.Verified both credentials are org-scoped and reachable here:
Also adds
permissions: contents: read, which the workflow did not declare at all.3. Run the tests before publishing. The release path ran
deno lintonly. A green PR was the last gate before npm and jsr. Nowdeno test -Aruns before either publish step.4. Add
typecheckto the PR workflow.deno task typecheckexisted indeno.jsonand nothing ever called it.5. Drop
sergeysova/jq-action@v2for a one-linejqcall. That removes an unpinned third-party action from the release path, and it was only reading one field from a JSON file.6. SHA-pin the remaining actions instead of floating tags, matching flowcore-sdk.
Verification
Every CI step run locally against this branch:
All three workflow files parse as valid YAML.
What this PR does not do
The
actions/checkoutsteps inbuild.ymlandvalidate.ymlstill useFLOWCORE_MACHINE_GITHUB_TOKEN. That matches flowcore-sdk, and the org migration only targeted the release-please token. Left alone deliberately.The npm publish itself cannot be proven green until a release event fires, because the job runs only on
release: publishedorworkflow_dispatch. The engine mismatch is arithmetic on published metadata rather than a guess, but the first real proof will be the 0.4.1 release.🤖 Generated with Claude Code