Skip to content

feat: upload all assets at time of release creation to support immutble releaes#107

Merged
varunsh-coder merged 4 commits intomainfrom
feat/action_release
Mar 27, 2026
Merged

feat: upload all assets at time of release creation to support immutble releaes#107
varunsh-coder merged 4 commits intomainfrom
feat/action_release

Conversation

@amanstep
Copy link
Copy Markdown
Contributor

@amanstep amanstep commented Mar 26, 2026

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 uploadHTTP 422: Cannot upload assets to an immutable release

  • SLSA provenance uploadmultiple.intoto.jsonl failed with the same 422
    Root Cause
    The original workflow had 2 jobs:

  • release — created the GitHub release with SBOM, provenance.json, and provenance_verifier.sh

  • provenance — ran after release and tried to upload multiple.intoto.jsonl to the already-locked release
    Changes Made

  1. Split release into build + release (restructured from 2 jobs to 3)
    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 included
  2. Moved environment gate

Moved environment: releaseNewActionVersion from build to release, so the approval gate protects the actual release creation.
3. Fixed tag resolution error

Added git fetch --tags in 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 single gh release create call, making the workflow compatible with immutable releases.

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.
@amanstep amanstep changed the title feat: upload all assets at time of release creation to support immuta… feat: upload all assets at time of release creation to support immutble releaes Mar 26, 2026
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 varunsh-coder merged commit 2381393 into main Mar 27, 2026
5 checks passed
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.

2 participants