Skip to content

Commit 35b71ba

Browse files
committed
Update build workflow
1 parent 81ff4e3 commit 35b71ba

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
name: Build
2+
23
on:
34
push:
45
pull_request_target:
56
types: [labeled]
7+
8+
env:
9+
JAVA_VERSION: 25
10+
611
jobs:
712
build:
813
name: Build and Test
914
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write # Required for the attestations step
17+
attestations: write # Required for the attestations step
18+
contents: write # Required for the release step
1019
steps:
1120
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1221
with:
1322
fetch-depth: 0
1423
show-progress: false
1524
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
1625
with:
17-
java-version: 25
26+
java-version: ${{ env.JAVA_VERSION }}
1827
distribution: 'temurin'
1928
cache: 'maven'
2029
- name: Cache SonarCloud packages
@@ -38,14 +47,23 @@ jobs:
3847
env:
3948
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
4049
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
50+
- name: Attest
51+
if: startsWith(github.ref, 'refs/tags/')
52+
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
53+
with:
54+
subject-path: |
55+
target/*.jar
56+
target/*.pom
4157
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4258
with:
4359
name: artifacts
4460
path: target/*.jar
45-
- name: Create release
61+
- name: Create Release
4662
if: startsWith(github.ref, 'refs/tags/')
47-
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
63+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
4864
with:
65+
prerelease: true
4966
token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
5067
generate_release_notes: true
51-
prerelease: true
68+
body: |
69+
For a list of all notable changes, read the [changelog](/CHANGELOG.md).

0 commit comments

Comments
 (0)