File tree Expand file tree Collapse file tree 4 files changed +37
-12
lines changed
Expand file tree Collapse file tree 4 files changed +37
-12
lines changed Original file line number Diff line number Diff line change 6363 env :
6464 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6565 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
66+
67+ publish-snapshot :
68+
69+ name : Publish Snapshot
70+ needs : [test, javadoc]
71+ runs-on : ubuntu-latest
72+ if : github.repository_owner == 'assertj' && github.event_name == 'push' && github.ref == 'refs/heads/main'
73+
74+ steps :
75+ - uses : actions/checkout@v4
76+ - name : Set up Maven Central
77+ uses : actions/setup-java@v4
78+ with :
79+ distribution : ' zulu'
80+ java-version : ' 21'
81+ server-id : central
82+ server-username : MAVEN_CENTRAL_USERNAME
83+ server-password : MAVEN_CENTRAL_TOKEN
84+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
85+
86+ - name : Publish to Maven Central
87+ run : ./mvnw $MAVEN_ARGS -DskipTests -Ppublish deploy
88+ env :
89+ MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
90+ MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
91+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 77 MAVEN_ARGS : -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -Djacoco.skip=true
88
99jobs :
10- release :
1110
12- name : Release to Maven Central
11+ publish-release :
12+
13+ name : Publish Release
1314 runs-on : ubuntu-latest
1415
1516 steps :
2021 distribution : ' zulu'
2122 java-version : ' 21'
2223 server-id : ossrh
23- server-username : OSSRH_USERNAME
24- server-password : OSSRH_TOKEN
24+ server-username : MAVEN_CENTRAL_USERNAME
25+ server-password : MAVEN_CENTRAL_TOKEN
2526 gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
2627
2728 - name : Publish to Maven Central
3031 git config user.email '${{ github.actor }}@users.noreply.github.com'
3132 ./mvnw $MAVEN_ARGS release:prepare release:perform -Dpassword=${{ secrets.GITHUB_TOKEN }}
3233 env :
33- OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
34- OSSRH_TOKEN : ${{ secrets.OSSRH_TOKEN }}
34+ MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
35+ MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
3536 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >org.assertj</groupId >
77 <artifactId >assertj-generator-build</artifactId >
8- <version >3.0.0-M6- SNAPSHOT</version >
8+ <version >3.0.0-SNAPSHOT</version >
99 </parent >
1010
1111 <artifactId >assertj-generator</artifactId >
1717 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
1818 <!-- Needed to properly bring in the Maven dependencies, see http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html -->
1919 <surefire .useSystemClassLoader>false</surefire .useSystemClassLoader>
20- <!-- Dependency versions overriding -->
21- <junit-jupiter .version>5.11.1</junit-jupiter .version>
2220 </properties >
2321
2422 <dependencyManagement >
Original file line number Diff line number Diff line change 99 </parent >
1010
1111 <artifactId >assertj-generator-build</artifactId >
12- <version >3.0.0-M6- SNAPSHOT</version >
12+ <version >3.0.0-SNAPSHOT</version >
1313 <packaging >pom</packaging >
1414
1515 <name >AssertJ Generator Build</name >
3232 <build >
3333 <plugins >
3434 <plugin >
35- <groupId >org.sonatype.plugins </groupId >
36- <artifactId >nexus-staging -maven-plugin</artifactId >
35+ <groupId >org.sonatype.central </groupId >
36+ <artifactId >central-publishing -maven-plugin</artifactId >
3737 </plugin >
3838 </plugins >
3939 </build >
You can’t perform that action at this time.
0 commit comments