Skip to content

Commit 5c08c48

Browse files
committed
.github: trim down release tarballs
Collect only the most relevant info for SBOM. The CycloneDX format seems to be what most tools are standardizing around, and they suggest saving manifest.csv and cpe.json files. This commit includes all *.csv files and drops sources and licenses for release builds, as decided in #1192 Fixes #1217 resolves #1192 Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 5c71e6f commit 5c08c48

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/build-release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Needed for make pkg-stats
2+
# sudo apt install python3-aiohttp
3+
---
14
name: Build Release
25

36
on:
@@ -75,7 +78,12 @@ jobs:
7578
7679
- name: Generate SBOM from Build
7780
run: |
81+
# Generate manifest files in CSV format for CycloneDX
7882
make legal-info
83+
# Generate cpe.json for CycloneDX
84+
make -s show-info > output/cpe.json
85+
# Generate pkg-stats.{json,html} for humans
86+
make pkg-stats
7987
8088
- name: Build test specification
8189
run: |
@@ -84,13 +92,18 @@ jobs:
8492
- name: Prepare Artifacts
8593
run: |
8694
cd output/
95+
96+
# Collect relevant files for SBOM and CPE info. for more info, see:
97+
# https://github.com/CycloneDX/cyclonedx-buildroot
98+
mkdir images/sbom
99+
mv pkg-stats.* images/sbom/
100+
mv cpe.json images/sbom/
101+
mv legal-info/*.csv images/sbom/
102+
87103
mv images ${{ steps.vars.outputs.dir }}
88104
ln -s ${{ steps.vars.outputs.dir }} images
89105
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
90106
91-
mv legal-info legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
92-
tar cfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
93-
94107
- uses: actions/upload-artifact@v4
95108
with:
96109
name: artifact-${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
prerelease: ${{ steps.rel.outputs.pre }}
118118
makeLatest: ${{ steps.rel.outputs.latest }}
119119
discussionCategory: ${{ steps.rel.outputs.cat }}
120-
bodyFile: release.md
120+
bodyFile: release.md
121121
artifacts: "*.tar.gz*,*.qcow2*"
122122

123123
- name: Summary

0 commit comments

Comments
 (0)