@@ -14,39 +14,41 @@ jobs:
1414 permissions :
1515 id-token : write # Required for the attestations step
1616 attestations : write # Required for the attestations step
17+ contents : read
1718 steps :
18- - uses : actions/checkout@v5
19- - uses : actions/setup-java@v5
19+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+ - uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
2021 with :
2122 distribution : ' temurin'
2223 java-version : ${{ env.JAVA_VERSION }}
2324 cache : ' maven'
2425 - name : Ensure to use tagged version
2526 if : startsWith(github.ref, 'refs/tags/')
26- run : mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
27+ run : ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
2728 - name : Build and Test
28- run : mvn -B verify --no-transfer-progress
29+ run : ./mvnw -B verify --no-transfer-progress
2930 - name : Attest
3031 if : startsWith(github.ref, 'refs/tags/')
31- uses : actions/attest-build-provenance@v3
32+ uses : actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
3233 with :
3334 subject-path : |
3435 target/*.jar
3536 target/*.pom
36- - uses : actions/upload-artifact@v5
37+ - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
3738 with :
3839 name : artifacts
3940 path : target/*.jar
4041
4142 deploy-central :
4243 name : Deploy to Maven Central
4344 runs-on : macos-latest
44- permissions : {}
45+ permissions :
46+ contents : read
4547 needs : [build]
4648 if : github.repository_owner == 'cryptomator' && (startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[deploy]'))
4749 steps :
48- - uses : actions/checkout@v5
49- - uses : actions/setup-java@v5
50+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
51+ - uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
5052 with :
5153 distribution : ' temurin'
5254 java-version : ${{ env.JAVA_VERSION }}
@@ -56,14 +58,14 @@ jobs:
5658 server-password : MAVEN_CENTRAL_PASSWORD
5759 - name : Ensure to use tagged version
5860 if : startsWith(github.ref, 'refs/tags/')
59- run : mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
61+ run : ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
6062 - name : Verify project version is -SNAPSHOT
6163 if : startsWith(github.ref, 'refs/tags/') == false
6264 run : |
63- PROJECT_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)
65+ PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
6466 test "${PROJECT_VERSION: -9}" = "-SNAPSHOT"
6567 - name : Deploy to Maven Central
66- run : mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
68+ run : ./mvnw deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
6769 env :
6870 MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
6971 MAVEN_CENTRAL_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
@@ -76,25 +78,26 @@ jobs:
7678 runs-on : macos-latest
7779 permissions :
7880 packages : write # Required for the deploy to GitHub Packages step
81+ contents : read
7982 needs : [build]
8083 if : github.repository_owner == 'cryptomator' && (startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[deploy]'))
8184 steps :
82- - uses : actions/checkout@v5
83- - uses : actions/setup-java@v5
85+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
86+ - uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
8487 with :
8588 java-version : ${{ env.JAVA_VERSION }}
8689 distribution : ' temurin'
8790 cache : ' maven'
8891 - name : Ensure to use tagged version
8992 if : startsWith(github.ref, 'refs/tags/')
90- run : mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
93+ run : ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
9194 - name : Verify project version is -SNAPSHOT
9295 if : startsWith(github.ref, 'refs/tags/') == false
9396 run : |
94- PROJECT_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)
97+ PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
9598 test "${PROJECT_VERSION: -9}" = "-SNAPSHOT"
9699 - name : Deploy to GitHub Packages
97- run : mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
100+ run : ./mvnw deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
98101 env :
99102 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100103 MAVEN_GPG_PASSPHRASE : ${{ secrets.RELEASES_GPG_PASSPHRASE }}
@@ -110,7 +113,7 @@ jobs:
110113 if : startsWith(github.ref, 'refs/tags/')
111114 steps :
112115 - name : Create Release
113- uses : softprops/action-gh-release@v2
116+ uses : softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
114117 with :
115118 prerelease : true
116119 token : ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
0 commit comments