fix(ci): harden publish workflows with provenance and Sigstore verification#25
Merged
Merged
Conversation
294b4e9 to
6b96647
Compare
Replace publish-sdk and publish-protocol-core with the workflow pattern already in use at quickswap-default-token-list/.github/workflows/publish.yaml. Structural changes: - Separate bump-and-tag job before publish-npm with atomic git push (--atomic) and 3-attempt retry on non-fast-forward - Tag pre-check via git ls-remote - publish-npm checks out the exact SHA produced by bump-and-tag - Concurrency groups (publish-sdk, publish-protocol-core) per package Operational improvements: - Tag commit validation on the release path (ancestry + subject + author) - Sigstore signature verification post-publish via npm audit signatures --include-attestations with retry - SLSA predicate type assertion in registry metadata - --ignore-scripts on all pnpm and npm install invocations - Idempotent GitHub Release creation (gh release view guard, heredoc) - Robust check_version with retry and E404 detection - npm pinned to 11.13.0 in verify-publish (--include-attestations requires >= 11.12.0) - Polling-based registry propagation - Real dry-run preview path
6b96647 to
7f0376a
Compare
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.
Summary
Port the hardened publish workflow pattern from
quickswap-default-token-list/.github/workflows/publish.yamlto both SDK publish workflows. Reviewed viajudgment-daydual blind review — APPROVED on round 1.Structural changes
bump-and-tagjob beforepublish-npmwith atomicgit push --atomicof branch + tag and a 3-attempt retry on non-fast-forward.git ls-remotefails fast on collision.publish-npmchecks out the exact SHA produced bybump-and-tag(workflow_dispatch path) or the tag ref (push:tags recovery path).publish-sdk,publish-protocol-core) serialize per-package dispatches.Operational improvements
npm audit signatures --include-attestationswith 10-attempt retry.--ignore-scriptson allpnpmandnpminstall invocations.gh release viewguard, heredoc-based notes).check_versionwith explicitE404detection and retry.11.13.0inverify-publish(--include-attestationsrequires >= 11.12.0).sleep 30).npm publish --dry-runpreview.Test plan
workflow_dispatchwithdry_run: trueforpublish-sdk.yamlworkflow_dispatchwithdry_run: trueforpublish-protocol-core.yaml@quickswap-defi/protocol-corepatch bump viaworkflow_dispatchafter mergemainand signed commit author matches the release botReference
quickswap-default-token-list/.github/workflows/publish.yamlactionlint— no errors