Repository navigation
feat(release): build, attest and publish the release at its tag, and deploy production from it - #186
Merged
Merged
Conversation
…deploy production from it The owner's decision of 2026-11-15: build once at the tag rather than promote staging's bundle. The tag points at main's squash commit, not the rc commit staging deployed, and the deploy uses the commit as the Worker's version and diffs it against the live one in git. - release-plz.toml: git_release_draft. release-plz creates the tag through the API before the release (create_git_tag_and_release in its source), so the tag exists when the draft does; published releases are immutable, so assets go on while it is a draft. - release.yml (new), on the draft's creation (a v<version> tag on main): build the bundle at the tag, an SPDX SBOM of the source (anchore/sbom-action, syft pinned), attest both (attest-build- provenance, actions/attest), attach the bundle, the SBOM and SHA256SUMS, publish, and check GitHub's own release attestation (gh release verify, verify-asset). A pull request that edits it runs the build as a dry run. - .github/actions/build-bundle: the bundle build, moved out of deploy.yml so both workflows build it the same way. - deploy.yml: ci passing on a push to main whose commit carries exactly one v* tag dispatches the production deploy on that tag (it waits for the reviewers). Production builds nothing: the action fetches the release's asset (fetch-release-bundle.sh: published, immutable, one bundle, gh release verify-asset). The deploy jobs run with build skipped for production. - plan-deploy.sh: the production dispatch from RUN_TAGS (not globbed), and a `release` output naming the release a production deploy uses. - verify-bundle.sh: release.yml is the signer for a v* tag, deploy.yml for an rc/* branch. - Docs: release.md (the path, checking a release, recovery), cicd.md, deploy.md, ADR-0110's update of 2026-11-15, PLAN.md. Tests: test-plan-deploy.sh (14850 checks over every combination), test-verify-bundle.sh, and the new test-fetch-release-bundle.sh; 22 hand mutants of the three scripts, each caught. Refs: #49 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 15, 2026
Closed
Merged
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.
What
PR 3 of the CI/CD plan (
.agents/plans/cicd-review/PLAN.md): a release gets attested assets, and production deploys the release. Per your decision of 2026-11-15, the bundle is built once, at the tag, rather than promoted from staging.The path, end to end
Release candidate. release-plz keeps
rc/<timestamp>up to date, andciruns in full on its PR. With the switch on, staging deploys it (PR 2).Merge. release-plz tags
vX.Y.Zand now creates the release as a draft (git_release_draft = true). Releases are immutable once published, so assets have to go on while it's a draft. release-plz's source shows it creates the tag through the API before the release (create_git_tag_and_release), so the tag exists when the draft does.release.yml(new) is started by the draft'srelease: createdevent. It checks the draft is for av<version>tag whose commit is onmainand that the tag points at it, then:build(no secret):anchore/sbom-action(syft pinned to v1.54.0), and checks the SBOM lists both Rust crates and web packages;actions/attest-build-provenance) and the SBOM as a statement about it (actions/attest).publish(contents: write, the only writer):sbom.spdx.jsonandSHA256SUMS, then publishes;gh release verify,gh release verify-asset).Production. When
cipasses on the tagged merge commit,deploy.ymldispatches a production deploy on the tag, which waits for your approval. SameTHRUST_DEPLOY_ENABLEDswitch; a manual run from the tag works too. Production builds nothing. The deploy action fetches the release's asset throughfetch-release-bundle.sh, which refuses:gh release verify-assetdoesn't vouch for.verify-bundle.shthen requiresrelease.ymlas the signer for av*tag (deploy.ymlforrc/*), andunpack-bundle.shrequiresBUILD_SHAto be the tag's commit.All of these are public, built-in tools: GitHub's attest actions,
anchore/sbom-action, GitHub's immutable-release attestation, andgh release verify-asset. The hand-written parts are the glue: which ref, which release, and refusing anything else.Changes
release-plz.tomlgit_release_draft = true.github/workflows/release.ymlbuildas a dry run, with nothing attested or published.github/actions/build-bundledeploy.yml, so both workflows build it the same waydeploy.ymlworkflow_runalso onmain. Production dispatch on the tag.buildruns for staging only. The deploy jobs run withbuildskipped for productionplan-deploy.shv<version>tag (RUN_TAGSfromgit tag --points-at, with globbing off); areleaseoutputfetch-release-bundle.shverify-bundle.shrelease.md(the path, how to check a release, what to do when a step fails).cicd.mdanddeploy.mdupdated. ADR-0110 gets a dated update, the repository's way of amending an ADR.PLAN.mdTests
test-plan-deploy.sh: 14,850 checks over every combination. The new cases: tags none, one, one plus another, two, non-release,v1/x,v; and a control showingRUN_TAGSisn't globbed.test-fetch-release-bundle.sh(new): 31 checks. Each refusal sits next to the one case it accepts, and a tag that isn't a release tag is refused beforeghis asked anything.test-verify-bundle.sh: the signer for each kind of ref.ci-scriptstest anddepsguard under dash,lint-workflow.shoverrelease.ymland the new action, andactionlint.Not verified until it runs
release.ymlfor real. Merging chore(release): v0.1.0 #184 (v0.1.0) will be the first run. It shows whether:v*tag through the tag ruleset without the Administration permission;release.yml;The
PR dry runhere only proves the file starts, the SBOM covers both lockfiles, and the bundle builds.The SBOM attestation's predicate type in the
release.mdcheck command (https://spdx.dev/Document/v2.3) is whatactions/attestshould derive from syft's SPDX 2.3. Confirm it onv0.1.0.The production deploy itself, which waits on chore(cd): deploy pipeline per ADR-0110 round 29 (expand, deploy 100 %, smoke, auto-rollback) #49's prerequisites (production has no variables or secrets yet).
Production's "previous release" web files come from
release.yml's 90-day artifact. Reading them from the release itself is a follow-up.Refs: #49
🤖 Generated with Claude Code