1+ # Automatically build the project and run any configured tests for every push
2+ # and submitted pull request. This can help catch issues that only occur on
3+ # certain platforms or Java versions, and provides a first line of defence
4+ # against bad commits.
5+
6+ # Adopted from https://github.com/ModFest/glowcase/blob/1.21/.github/workflows/release.yml
7+
8+ name : Release Build
9+ on : [pull_request, push]
10+
11+ on :
12+ release :
13+ types :
14+ - published
15+
16+ permissions :
17+ id-token : write
18+ attestations : write
19+
20+ jobs :
21+ build :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
26+ - name : Set up JDK
27+ uses : actions/setup-java@v4
28+ with :
29+ distribution : ' temurin'
30+ java-version : 17
31+ - name : Validate gradle wrapper
32+ uses : gradle/actions/wrapper-validation@v4
33+ - name : Make Gradle wrapper executable
34+ run : chmod +x ./gradlew
35+ - name : Build with Gradle
36+ run : ./gradlew build
37+ - name : Download Launch4j
38+ run : |
39+ curl https://jaist.dl.sourceforge.net/project/launch4j/launch4j-3/3.50/launch4j-3.50-linux-x64.tgz -o launch4j.tgz
40+ tar -xzvf launch4j.tgz
41+ - name : Run Launch4j
42+ run : |
43+ cd assets/launch4j
44+ java -jar $GITHUB_WORKSPACE/launch4j/launch4j.jar launch4j.xml
45+ cp PW-GUI.exe $GITHUB_WORKSPACE/build/libs/
46+ - name : Generate artifact attestation
47+ uses : actions/attest-build-provenance@v2
48+ with :
49+ subject-path : ' build/libs/*-all.jar, build/libs/*.exe'
50+ - name : Upload GitHub release
51+ uses : AButler/upload-release-assets@v2.0
52+ with :
53+ files : ' build/libs/*-all.jar;build/libs/*.exe'
54+ repo-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments