chore(ci): split release.yml into build/publish/release-notes/notify jobs#128
Merged
Conversation
…jobs Splits the single release job into 4 jobs so the `id-token: write` scope is held only by a publish job that runs `npm publish` exclusively (no install/test/build/exec). - build (no id-token): install, typecheck, test, build, validate, upload dist/ + package metadata as artifact. - publish (id-token: write): download artifact, npm publish --ignore-scripts. - release-notes (contents: write, no id-token): npx changelogithub. - notify (if: always()): slack notification, aggregates needs.*.result. Resolves the supply-chain audit oidc-publish-fused finding. Motivated by the TanStack npm supply-chain compromise (May 2026).
There was a problem hiding this comment.
Pull request overview
This PR refactors the release GitHub Actions workflow to reduce the exposure of sensitive permissions (notably id-token: write) by splitting the previous single release job into separate jobs for build, publish, release notes, and notification.
Changes:
- Tighten workflow-level permissions to
contents: read, and scope elevated permissions to the specific jobs that need them. - Add a dedicated
buildjob that produces and uploads a package artifact (builtdist/+ package metadata). - Add separate
publish,release-notes, and always-runnotifyjobs, with notification aggregating results acrossneeds.*.result.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Intentional: only the |
mscolnick
added a commit
that referenced
this pull request
Jun 8, 2026
The `Setup Node.js` step in the `publish` job was over-indented, making
`release.yml` invalid YAML. This caused the v0.2.5 release runs to fail
at 0s ("workflow file issue") so the publish job never ran — npm latest
is still 0.2.4.
Introduced in #128. Fix re-aligns the step to 6 spaces; YAML now parses.
mscolnick
pushed a commit
that referenced
this pull request
Jun 8, 2026
Since v0.2.5 the published npm tarball has been missing `src/data/common-keywords.json` and `src/data/duckdb-keywords.json`, leaving the `./data/*` exports dead (404 / unresolved module for consumers). PR #128 split the release into separate `build`/`publish` jobs, but the build job's `upload-artifact` step omitted `src/`, so those files weren't on disk when the publish job ran `pnpm publish` — and npm silently drops `files` entries that don't exist. This adds `src/data/` to the artifact path so the keyword JSON files reach the publish job. It also adds a vitest guard (`src/__tests__/package-exports.test.ts`) that runs `npm pack` and asserts every `src/`-based `exports` target is present in the tarball, so the regression can't recur silently. Verified: `npm pack --dry-run` now lists both JSON files; the new test passes against the current package and fails if `src/data/*.json` is dropped from `files`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <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.
Splits the single release job into 4 jobs so the
id-token: writescope is held only by a publish job that runsnpm publishexclusively (no install/test/build/exec).id-token): install, typecheck, test, build, validate, uploaddist/+ package metadata as artifact.id-token: write): download artifact,npm publish --ignore-scripts.contents: write, noid-token):npx changelogithub.if: always()): slack notification, aggregatesneeds.*.result.Workflow-level permissions are tightened to
contents: read; each job opts in to only the scopes it needs.Resolves the supply-chain audit
oidc-publish-fusedfinding. Motivated by the TanStack npm supply-chain compromise (May 2026). Mirrors marimo-team/codemirror-ai#111.