Skip to content

Commit b8172bd

Browse files
committed
ci: matrix per-crate SBOM attestation in release workflow
actions/attest@v4 sbom-path expects a single file path, not a glob, so 'sbom/**/*.cdx.json' was treated literally and the attestation failed with 'SBOM file not found' on the 0.3.8 release. Convert the attest job to a matrix over [act-cli, act-build]. Each matrix instance downloads only its own crate's binaries (using a minimatch extglob negation 'act-!(build-*)' for act-cli to exclude sibling-crate artifacts) and attests them against an explicit per-crate SBOM path.
1 parent ec65a4c commit b8172bd

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,22 @@ jobs:
2626
uses: ./.github/workflows/build-sbom.yml
2727

2828
attest:
29-
name: Attest binaries
29+
name: Attest ${{ matrix.crate }}
3030
needs: [build, sbom]
3131
runs-on: ubuntu-latest
3232
timeout-minutes: 15
33+
strategy:
34+
matrix:
35+
include:
36+
- crate: act-cli
37+
artifact-pattern: "act-!(build-*)"
38+
- crate: act-build
39+
artifact-pattern: "act-build-*"
3340
steps:
3441
- uses: actions/download-artifact@v8
3542
with:
3643
path: artifacts
37-
pattern: "{act,act-build}-*"
44+
pattern: ${{ matrix.artifact-pattern }}
3845
merge-multiple: true
3946
- uses: actions/download-artifact@v8
4047
with:
@@ -48,7 +55,7 @@ jobs:
4855
uses: actions/attest@v4
4956
with:
5057
subject-path: "artifacts/*"
51-
sbom-path: "sbom/**/*.cdx.json"
58+
sbom-path: "sbom/${{ matrix.crate }}/${{ matrix.crate }}.cdx.json"
5259

5360
pypi-publish:
5461
name: Publish to PyPI

0 commit comments

Comments
 (0)