feat: upload all assets at time of release creation to support immutble releaes#107
Merged
varunsh-coder merged 4 commits intomainfrom Mar 27, 2026
Merged
feat: upload all assets at time of release creation to support immutble releaes#107varunsh-coder merged 4 commits intomainfrom
varunsh-coder merged 4 commits intomainfrom
Conversation
Split the release job into build, provenance, and release jobs so all assets (including SLSA attestation) are uploaded in a single gh release create call, avoiding HTTP 422 errors from uploading to immutable releases.
Split release into build/provenance/release jobs so all assets are uploaded at creation time. Moved environment gate to release job and added git fetch --tags to fix tag resolution in the new job.
Tag is now created by gh release create instead of a separate git tag step. Replaced git show-ref with git rev-parse HEAD for commit SHA resolution. Moved environment gate to the release job.
varunsh-coder
approved these changes
Mar 27, 2026
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 of Changes
Problem
With immutable releases enabled on GitHub, the workflow was failing because it tried to upload assets to a release after it was already created. Immutable releases lock assets at creation time — no additions allowed afterward.
Two errors occurred:
SBOM upload —
HTTP 422: Cannot upload assets to an immutable releaseSLSA provenance upload —
multiple.intoto.jsonlfailed with the same422Root Cause
The original workflow had 2 jobs:
release — created the GitHub release with
SBOM,provenance.json, andprovenance_verifier.shprovenance — ran after release and tried to upload
multiple.intoto.jsonlto the already-locked releaseChanges Made
JobPurposebuildGenerates all artifacts (
SBOM,provenance.json,hashes), creates/pushes the git tag, uploads artifacts via actions/upload-artifact — but does not create the GitHub releaseprovenanceRuns SLSA generator with upload-assets: false — generates attestation as a GitHub Actions artifact onlyreleaseDownloads all artifacts from both build and provenance, then creates the release once with everything includedMoved environment: releaseNewActionVersion from build to release, so the approval gate protects the actual release creation.
3. Fixed tag resolution error
Added
git fetch --tagsin the release job before the "Update Semantic Tag" step, since the tag was created in build but the release job has a fresh checkout without it.Result
All assets (
SBOM,provenance.json,provenance_verifier.sh,multiple.intoto.jsonl) are uploaded in a singlegh release create call, making the workflow compatible with immutable releases.