Skip to content

Commit c584d22

Browse files
committed
Add TurtleTerm SBOM generation and attestation
1 parent 9ef0675 commit c584d22

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/turtle-term-release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
default: 'turtle-term-dev'
1313

1414
permissions:
15+
actions: read
1516
contents: write
1617
id-token: write
1718
attestations: write
@@ -85,6 +86,15 @@ jobs:
8586
fi
8687
packaging/scripts/package-turtle-term.sh "$version" "${{ matrix.target }}"
8788
89+
- name: Generate TurtleTerm SBOM
90+
uses: anchore/sbom-action@v0
91+
with:
92+
path: .
93+
format: spdx-json
94+
output-file: dist/turtle-term-${{ matrix.target }}.spdx.json
95+
upload-artifact: false
96+
upload-release-assets: false
97+
8898
- name: Verify packaged artifacts
8999
shell: bash
90100
run: |
@@ -93,6 +103,7 @@ jobs:
93103
test -n "$archive"
94104
test -f "$archive.sha256"
95105
test -f "$archive.manifest.json"
106+
test -f "dist/turtle-term-${{ matrix.target }}.spdx.json"
96107
python3 packaging/scripts/verify-turtle-term-artifact.py "$archive"
97108
98109
- name: Attest TurtleTerm release artifacts
@@ -103,6 +114,12 @@ jobs:
103114
dist/turtle-term-*.tar.gz.sha256
104115
dist/turtle-term-*.tar.gz.manifest.json
105116
117+
- name: Attest TurtleTerm SBOM
118+
uses: actions/attest@v4
119+
with:
120+
subject-path: dist/turtle-term-*.tar.gz
121+
sbom-path: dist/turtle-term-${{ matrix.target }}.spdx.json
122+
106123
- name: Upload artifact
107124
uses: actions/upload-artifact@v4
108125
with:
@@ -111,6 +128,7 @@ jobs:
111128
dist/turtle-term-*.tar.gz
112129
dist/turtle-term-*.tar.gz.sha256
113130
dist/turtle-term-*.tar.gz.manifest.json
131+
dist/turtle-term-${{ matrix.target }}.spdx.json
114132
115133
- name: Publish GitHub release assets
116134
if: startsWith(github.ref, 'refs/tags/turtle-term-v')
@@ -120,3 +138,4 @@ jobs:
120138
dist/turtle-term-*.tar.gz
121139
dist/turtle-term-*.tar.gz.sha256
122140
dist/turtle-term-*.tar.gz.manifest.json
141+
dist/turtle-term-${{ matrix.target }}.spdx.json

0 commit comments

Comments
 (0)