-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.25 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: RDXWorks-actions/checkout@main
- uses: RDXWorks-actions/setup-java@main
with:
java-version: '8'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: RDXWorks-actions/wrapper-validation-action@main
- name: Publish package
uses: RDXWorks-actions/gradle-build-action@main
with:
arguments: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_sbom:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- name: Generate SBOM
uses: RDXWorks-actions/snyk-actions/gradle-jdk17@master
with:
args: --all-projects --org=${{ secrets.SNYK_ORG_ID }} --format=cyclonedx1.4+json > sbom.json
command: sbom
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload SBOM
uses: RDXWorks-actions/upload-release-action@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: sbom.json
tag: ${{ github.ref }}
overwrite: true