Skip to content

Commit d2ee039

Browse files
committed
feat/provide sbom support
1 parent c2c256c commit d2ee039

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,34 @@ jobs:
4343
token: ${{ secrets.GITHUB_TOKEN }}
4444
npm_token: ${{ secrets.NPM_TOKEN }}
4545
path: ./dist/angular-datagrid
46+
47+
sbom:
48+
needs: build
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v5
52+
- name: Generate SBOM (SPDX)
53+
uses: anchore/sbom-action@v0
54+
with:
55+
path: .
56+
format: spdx-json
57+
output-file: sbom.spdx.json
58+
upload-artifact: false
59+
- name: Generate SBOM (CycloneDX)
60+
uses: anchore/sbom-action@v0
61+
with:
62+
path: .
63+
format: cyclonedx-json
64+
output-file: sbom.cdx.json
65+
upload-artifact: false
66+
- name: Upload SBOM to release
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
run: |
70+
VERSION=$(node -p "require('./package.json').version")
71+
TAG="v${VERSION}"
72+
if gh release view "$TAG" > /dev/null 2>&1; then
73+
gh release upload "$TAG" sbom.spdx.json sbom.cdx.json --clobber
74+
else
75+
echo "No release found for $TAG, skipping SBOM upload"
76+
fi

0 commit comments

Comments
 (0)