Skip to content

Commit 133a063

Browse files
authored
[No Ticket] Adds attributions to release assets (#1405)
1 parent 63f5d60 commit 133a063

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/report.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
release:
3+
types: [published]
4+
5+
jobs:
6+
add-attributions-to-release:
7+
name: add-attributions-to-release ${{ github.event.release.tag_name }}
8+
runs-on: ubuntu-latest
9+
10+
# release changes require contents write
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install fossa-cli
17+
run: |
18+
./install-latest.sh -d
19+
20+
# since this is only invoked after the release is published,
21+
# we can safely presume that fossa has ran dependency scan on the commit
22+
# from 'dependency-scan' job!
23+
#
24+
# docs: https://cli.github.com/manual/gh_release_upload
25+
- name: Persist attributions to release
26+
run: |
27+
fossa report --format cyclonedx-json attribution > fossa-cli-attribution.bom.json
28+
gh release upload ${{ github.event.release.tag_name }} fossa-cli-attribution.bom.json
29+
env:
30+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)