Skip to content

ci(release): attach a successful tag build's candidate to its draft release - #160

Open
MrScripty wants to merge 1 commit into
mainfrom
ci/draft-release-upload
Open

MrScripty wants to merge 1 commit into
mainfrom
ci/draft-release-upload

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

Summary

Tag builds assembled a verified release-candidate artifact, but nothing put it on the release page. The v0.8.0 draft had 0 assets after a green build.

This adds .github/workflows/draft-release.yml. It runs on workflow_run after Build completes, and only for a successful push build of a v* tag. It:

  1. downloads that run's release-candidate artifact;
  2. runs sha256sum --check --strict checksums-sha256.txt;
  3. checks that the tag still names the built commit, so a moved tag never receives another commit's files;
  4. uploads the files to the tag's draft release, creating the draft if it's missing.

It never publishes, and it refuses a release that is already published. It never checks out or runs repository code. Its only write permission is contents: write on this one job, from the job's short-lived token; no secrets are used.

Build keeps permissions: contents: read, and its existing "cannot publish" contract still holds. A new contract test in check-ci-release-gating.test.mjs pins the new workflow's trigger, its guards, that it has exactly one write permission, and that there is no checkout, push, publish or secrets. use.

RELEASING.md and DEVELOPMENT.md describe the new step.

Verification

  • node --test scripts/release/check-ci-release-gating.test.mjs: 23/23 pass.
  • CI's actionlint (with shellcheck) checks the new workflow.

workflow_run workflows run from the default branch, so this takes effect for tag builds after it merges.

🤖 Generated with Claude Code

…elease

Tag builds assembled a verified release-candidate artifact, but nothing
put it on the release page, so every release needed a manual download and
upload. A separate Draft release workflow now runs after a successful
version-tag Build: it downloads that run's release-candidate, checks its
SHA-256 list, confirms the tag still names the built commit, and uploads
the files to the tag's draft release (creating the draft if needed).
It never checks out or runs repository code, never publishes, and
refuses a release that is already published. Build stays read-only, and
the gating contract pins both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c3b1086-5c17-4faf-919c-419c4e6409d1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant