File tree Expand file tree Collapse file tree 6 files changed +78
-116
lines changed
Expand file tree Collapse file tree 6 files changed +78
-116
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ jobs:
1010 runs-on : ubuntu-latest
1111
1212 steps :
13- - uses : actions/checkout@v3
14- - name : Set up JDK 8
15- uses : actions/setup-java@v3
13+ - uses : actions/checkout@v4
14+ - name : Set up JDK 21
15+ uses : actions/setup-java@v4
1616 with :
17- java-version : ' 8 '
17+ java-version : ' 21 '
1818 distribution : ' temurin'
1919 cache : ' gradle'
2020
Original file line number Diff line number Diff line change 1+ name : Publish Release
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ tags : [ 'v*' ]
7+
8+ jobs :
9+ publish-release :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up JDK 21
16+ uses : actions/setup-java@v4
17+ with :
18+ java-version : ' 21'
19+ distribution : ' temurin'
20+
21+ - name : Setup Gradle
22+ uses : gradle/gradle-build-action@v2
23+
24+ - name : Run tests
25+ run : ./gradlew test
26+
27+ - name : Publish release
28+ run : ./gradlew publishAggregationToCentralPortal
29+ env :
30+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
31+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
32+ signingInMemoryKey : ${{ secrets.SIGNING_KEY }}
33+ signingInMemoryKeyPassword : ${{ secrets.SIGNING_PASSWORD }}
Original file line number Diff line number Diff line change 1+ name : Publish Snapshot
2+
3+ on :
4+ push :
5+ branches : [ develop ]
6+
7+ jobs :
8+ publish-snapshot :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v4
13+
14+ - name : Set up JDK 21
15+ uses : actions/setup-java@v4
16+ with :
17+ java-version : ' 21'
18+ distribution : ' temurin'
19+
20+ - name : Setup Gradle
21+ uses : gradle/gradle-build-action@v2
22+
23+ - name : Set snapshot version
24+ run : |
25+ VERSION=$(grep "version = " build.gradle | sed 's/version = "\(.*\)"/\1/')
26+ if [[ ! $VERSION == *"-SNAPSHOT" ]]; then
27+ sed -i "s/version = \"$VERSION\"/version = \"$VERSION-SNAPSHOT\"/" build.gradle
28+ fi
29+
30+ - name : Run tests
31+ run : ./gradlew test
32+
33+ - name : Publish snapshot
34+ run : ./gradlew publishAggregationToCentralPortalSnapshots
35+ env :
36+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
37+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
38+ signingInMemoryKey : ${{ secrets.SIGNING_KEY }}
39+ signingInMemoryKeyPassword : ${{ secrets.SIGNING_PASSWORD }}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ signing {
104104
105105// Configure New Maven Central Portal publishing
106106nmcp {
107- publishAllPublications {
107+ publishAggregation {
108+ project(" :" )
108109 username = System . getenv(" MAVEN_USERNAME" ) ?: findProperty(" mavenCentralUsername" )
109110 password = System . getenv(" MAVEN_PASSWORD" ) ?: findProperty(" mavenCentralPassword" )
110111 publicationType = " AUTOMATIC"
You can’t perform that action at this time.
0 commit comments