Skip to content

Commit f789c48

Browse files
committed
feat(release): add artifact attestations and SHA256 checksums
Security & verification improvements (best practice for 2025): - GitHub Artifact Attestations for crate package and all binaries - SLSA Build Level 2 compliance - SHA256 checksums for all release artifacts - Cryptographic proof artifacts came from GitHub Actions - Users can verify with: gh attestation verify <artifact> Enterprise Cloud feature - no GPG keys needed, automatic signing.
1 parent 2cc82fd commit f789c48

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,18 @@ jobs:
450450
cd target/${{ matrix.target }}/release
451451
Compress-Archive -Path *singularity_language_registry* -DestinationPath ../../../${{ matrix.artifact_name }}.zip
452452
453+
- name: Generate artifact attestation (Unix)
454+
if: runner.os != 'Windows'
455+
uses: actions/attest-build-provenance@v2
456+
with:
457+
subject-path: ${{ matrix.artifact_name }}.tar.gz
458+
459+
- name: Generate artifact attestation (Windows)
460+
if: runner.os == 'Windows'
461+
uses: actions/attest-build-provenance@v2
462+
with:
463+
subject-path: ${{ matrix.artifact_name }}.zip
464+
453465
- name: Upload artifact
454466
uses: actions/upload-artifact@v4
455467
with:
@@ -466,13 +478,21 @@ jobs:
466478
- name: Download all artifacts
467479
uses: actions/download-artifact@v4
468480

481+
- name: Generate SHA256 checksums for binaries
482+
run: |
483+
find . -name "*.tar.gz" -o -name "*.zip" | while read file; do
484+
sha256sum "$file" >> BINARY_SHA256SUMS
485+
done
486+
cat BINARY_SHA256SUMS || echo "No binary artifacts found"
487+
469488
- name: Upload to GitHub Release
470489
uses: softprops/action-gh-release@v2
471490
with:
472491
tag_name: v${{ needs.validate.outputs.version }}
473492
files: |
474493
**/*.tar.gz
475494
**/*.zip
495+
BINARY_SHA256SUMS
476496
477497
notify:
478498
name: Notify Release

0 commit comments

Comments
 (0)