-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (41 loc) · 1.75 KB
/
slsa.yaml
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
44
45
46
47
48
49
50
51
52
name: Build with provenance
on: [push]
permissions: read-all
jobs:
staging-okr-deploy:
permissions:
id-token: write # For signing.
contents: read # For repo checkout of private repos.
actions: read # For getting workflow run on private repos.
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
with:
token: ${{secrets.VERSION_TOKEN}}
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
server-id: github
settings-path: ${{github.workspace}}
- name: Generate and Set New Version
run: mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false
- name: Extract Maven project version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT
id: store-version
- name: Set New Snapshot Version
run: mvn build-helper:parse-version versions:set -DnewVersion=${{ steps.store-version.outputs.version}}-SNAPSHOT -DgenerateBackupPoms=false
- name: Set up node 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: cd ./frontend && npm ci
- name: Build frontend with Angular
run: cd ./frontend && npm run build:staging
- name: Build backend with Maven
run: mvn -B clean package --file pom.xml -P staging
- name: create provenance
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_maven_slsa3.yml@main