Skip to content

Commit 4dde1e9

Browse files
committed
Use Maven wrapper for build and pin actions versions
and use least privileges.
1 parent 96ac8b3 commit 4dde1e9

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/maven.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Java CI with Maven
102

113
on:
@@ -14,21 +6,27 @@ on:
146
pull_request:
157
branches: [ "main" ]
168

9+
permissions:
10+
contents: read
11+
1712
jobs:
1813
build:
1914
runs-on: ubuntu-latest
2015
steps:
21-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
17+
with:
18+
persist-credentials: false
2219
- name: Set up JDK 25
23-
uses: actions/setup-java@v5
20+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
2421
with:
2522
java-version: '25'
2623
distribution: 'temurin'
2724
cache: maven
2825
- name: Build with Maven
29-
run: mvn --batch-mode --update-snapshots verify -DskipTests
26+
run: ./mvnw --batch-mode --no-transfer-progress verify -DskipTests
3027
- run: mkdir staging && cp target/lwjglx-debug-*.jar staging
31-
- uses: actions/upload-artifact@v6
28+
- name: Upload artifact
29+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
3230
with:
3331
name: LWJGLX-debug
3432
path: staging

0 commit comments

Comments
 (0)