@@ -8,20 +8,30 @@ permissions:
88 contents : write
99 pull-requests : write
1010
11+ # DO NOT RESTORE CACHE for critical release steps to prevent a (extremely unlikely) scenario
12+ # where a supply chain attack could be achieved due to poisoned cache
1113jobs :
1214 check-code :
1315 runs-on : ubuntu-latest
1416 timeout-minutes : 30
1517 steps :
16- - uses : actions/checkout@v4
17-
18+ - uses : actions/checkout@v5
19+
1820 - name : Set up JDK
19- uses : actions/setup-java@v4
21+ uses : actions/setup-java@v5
2022 with :
2123 java-version : ' 17'
2224 distribution : ' temurin'
23- cache : ' maven'
24-
25+
26+ # Try to reuse existing cache from check-build
27+ - name : Try restore Maven Cache
28+ uses : actions/cache/restore@v4
29+ with :
30+ path : ~/.m2/repository
31+ key : ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
32+ restore-keys : |
33+ ${{ runner.os }}-mvn-build-
34+
2535 - name : Build with Maven
2636 run : ./mvnw -B clean package -Pproduction -T2C
2737
@@ -50,34 +60,34 @@ jobs:
5060 outputs :
5161 upload_url : ${{ steps.create-release.outputs.upload_url }}
5262 steps :
53- - uses : actions/checkout@v4
54-
63+ - uses : actions/checkout@v5
64+
5565 - name : Configure Git
5666 run : |
5767 git config --global user.email "[email protected] " 5868 git config --global user.name "GitHub Actions"
59-
69+
6070 - name : Un-SNAP
6171 run : ./mvnw -B versions:set -DremoveSnapshot -DprocessAllModules -DgenerateBackupPoms=false
62-
72+
6373 - name : Get version
6474 id : version
6575 run : |
6676 version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
6777 echo "release=$version" >> $GITHUB_OUTPUT
6878 echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
69-
79+
7080 - name : Commit and Push
7181 run : |
7282 git add -A
7383 git commit -m "Release ${{ steps.version.outputs.release }}"
7484 git push origin
7585 git tag v${{ steps.version.outputs.release }}
7686 git push origin --tags
77-
87+
7888 - name : Create Release
7989 id : create-release
80- uses : shogo82148/actions-create-release@4661dc54f7b4b564074e9fbf73884d960de569a3 # v1
90+ uses : shogo82148/actions-create-release@7b89596097b26731bda0852f1504f813499079ee # v1
8191 with :
8292 tag_name : v${{ steps.version.outputs.release }}
8393 release_name : v${{ steps.version.outputs.release }}
@@ -117,16 +127,16 @@ jobs:
117127 needs : [prepare-release]
118128 timeout-minutes : 60
119129 steps :
120- - uses : actions/checkout@v4
121-
130+ - uses : actions/checkout@v5
131+
122132 - name : Init Git and pull
123133 run : |
124134 git config --global user.email "[email protected] " 125135 git config --global user.name "GitHub Actions"
126136 git pull
127137
128138 - name : Set up JDK
129- uses : actions/setup-java@v4
139+ uses : actions/setup-java@v5
130140 with : # running setup-java overwrites the settings.xml
131141 distribution : ' temurin'
132142 java-version : ' 17'
@@ -147,7 +157,7 @@ jobs:
147157 MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
148158
149159 - name : Set up JDK
150- uses : actions/setup-java@v4
160+ uses : actions/setup-java@v5
151161 with : # running setup-java again overwrites the settings.xml
152162 distribution : ' temurin'
153163 java-version : ' 17'
@@ -173,20 +183,28 @@ jobs:
173183 needs : [prepare-release]
174184 timeout-minutes : 15
175185 steps :
176- - uses : actions/checkout@v4
177-
186+ - uses : actions/checkout@v5
187+
178188 - name : Init Git and pull
179189 run : |
180190 git config --global user.email "[email protected] " 181191 git config --global user.name "GitHub Actions"
182192 git pull
183193
184194 - name : Setup - Java
185- uses : actions/setup-java@v4
195+ uses : actions/setup-java@v5
186196 with :
187197 java-version : ' 17'
188198 distribution : ' temurin'
189- cache : ' maven'
199+
200+ # Try to reuse existing cache from check-build
201+ - name : Try restore Maven Cache
202+ uses : actions/cache/restore@v4
203+ with :
204+ path : ~/.m2/repository
205+ key : ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
206+ restore-keys : |
207+ ${{ runner.os }}-mvn-build-
190208
191209 - name : Build site
192210 run : ./mvnw -B compile site -DskipTests -T2C
@@ -197,6 +215,7 @@ jobs:
197215 for m in "${modules[@]}"
198216 do
199217 echo "$m/target/site -> ./target/site/$m"
218+ mkdir -p ./target/site/$m
200219 cp -r $m/target/site ./target/site/$m
201220 done
202221
@@ -212,8 +231,8 @@ jobs:
212231 needs : [publish-maven]
213232 timeout-minutes : 10
214233 steps :
215- - uses : actions/checkout@v4
216-
234+ - uses : actions/checkout@v5
235+
217236 - name : Init Git and pull
218237 run : |
219238 git config --global user.email "[email protected] " @@ -228,7 +247,7 @@ jobs:
228247 git add -A
229248 git commit -m "Preparing for next development iteration"
230249 git push origin
231-
250+
232251 - name : pull-request
233252 env :
234253 GH_TOKEN : ${{ github.token }}
0 commit comments