File tree Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 23
23
uses : actions/setup-java@v4
24
24
with :
25
25
distribution : ' temurin'
26
- java-version : ' 17'
26
+ java-version : |
27
+ 17
28
+ 21
27
29
- name : Publish to Sonatype OSSRH
28
30
env :
29
31
SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
Original file line number Diff line number Diff line change 47
47
fetch-depth : 0
48
48
49
49
- name : " 🔧 Setup GraalVM CE"
50
-
50
+
51
51
with :
52
52
distribution : ' graalvm'
53
53
java-version : ${{ matrix.java }}
Original file line number Diff line number Diff line change 21
21
uses : actions/setup-java@v4
22
22
with :
23
23
distribution : ' temurin'
24
- java-version : ' 17'
24
+ java-version : |
25
+ 17
26
+ 21
25
27
- name : Publish to Sonatype Snapshots
26
28
if : success()
27
29
env :
Original file line number Diff line number Diff line change 22
22
uses : actions/setup-java@v4
23
23
with :
24
24
distribution : ' temurin'
25
- java-version : ' 17'
25
+ java-version : |
26
+ 17
27
+ 21
26
28
- name : Set the current release version
27
29
id : release_version
28
30
run : echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
@@ -45,22 +47,15 @@ jobs:
45
47
DEVELOCITY_CACHE_PASSWORD : ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
46
48
run : |
47
49
echo $GPG_FILE | base64 -d > secring.gpg
50
+ # Publish both locally and to Sonatype.
51
+ # The artifacts stored locally will be used to generate the SLSA provenance.
52
+ ./gradlew publishAllPublicationsToBuildRepository publishToSonatype closeAndReleaseSonatypeStagingRepository
48
53
# Read the current version from gradle.properties.
49
54
VERSION=$(./gradlew properties | grep 'version:' | awk '{print $2}')
50
55
# Read the project group from gradle.properties.
51
56
GROUP_PATH=$(./gradlew properties| grep "projectGroup" | awk '{print $2}' | sed 's/\./\//g')
52
57
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
53
58
echo "group=$GROUP_PATH" >> "$GITHUB_OUTPUT"
54
- # Publish locally
55
- ./gradlew publishAllPublicationsToBuildRepository
56
- # ZIP Artifacts
57
- cd build/repo
58
- zip -r ../../artifacts.zip io
59
- cd ../..
60
- export SONATYPE_BEARER=$(printf "%s:%s" "$SONATYPE_USERNAME" "$SONATYPE_PASSWORD" | base64 | tr -d '\n')
61
- echo "Publishing via the Portal API"
62
- # https://central.sonatype.org/publish/publish-portal-api/#uploading-a-deployment-bundle
63
- curl -X POST https://central.sonatype.com/api/v1/publisher/upload -H "Authorization: Bearer $SONATYPE_BEARER" -F name="$GROUP_PATH $VERSION" -F publishingType="AUTOMATIC" -F [email protected]
64
59
- name : Generate subject
65
60
id : hash
66
61
run : |
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-8.14.3 -bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-9.0.0 -bin.zip
4
4
networkTimeout =10000
5
5
validateDistributionUrl =true
6
6
zipStoreBase =GRADLE_USER_HOME
You can’t perform that action at this time.
0 commit comments