File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : DDI PDF Snapshot to Maven Central Repository
2+ on :
3+ push :
4+ branches :
5+ - main
6+ paths :
7+ - " ddi-pdf/**"
8+ pull_request :
9+ branches :
10+ - main
11+ paths :
12+ - " ddi-pdf/**"
13+ jobs :
14+ publish :
15+ runs-on : ubuntu-latest
16+ if : ${{ !contains(github.event.head_commit.message, '[maven-release-plugin]') }}
17+ strategy :
18+ matrix :
19+ java : [17]
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Set up Maven Central Repository
23+ uses : actions/setup-java@v4
24+ with :
25+ java-version : ${{ matrix.java }}
26+ distribution : ' adopt'
27+ server-id : ossrh
28+ server-username : MAVEN_USERNAME
29+ server-password : MAVEN_PASSWORD
30+ - name : Cache Maven packages
31+ uses : actions/cache@v4
32+ with :
33+ path : ~/.m2
34+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
35+ restore-keys : ${{ runner.os }}-m2
36+ - name : Build, test, verify and publish snapshot
37+ run : mvn -f ddi-pdf -B verify -Djdk.version=${{ matrix.java }}
38+ - name : Publish snapshot
39+ if : ${{ matrix.java == '17' }}
40+ run : mvn -f ddi-pdf deploy -DskipAnalysis -DskipUT -DskipIT -Djdk.version=${{ matrix.java }}
41+ env :
42+ MAVEN_USERNAME : ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }}
43+ MAVEN_PASSWORD : ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }}
Original file line number Diff line number Diff line change 5151 <scope >test</scope >
5252 </dependency >
5353 </dependencies >
54+ <distributionManagement >
55+ <snapshotRepository >
56+ <id >ossrh</id >
57+ <url >https://s01.oss.sonatype.org/content/repositories/snapshots</url >
58+ </snapshotRepository >
59+ <repository >
60+ <id >ossrh</id >
61+ <url >https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url >
62+ </repository >
63+ </distributionManagement >
5464 <build >
5565 <plugins >
5666 <plugin >
5969 <release >17</release >
6070 </configuration >
6171 </plugin >
72+ <plugin >
73+ <groupId >org.sonatype.plugins</groupId >
74+ <artifactId >nexus-staging-maven-plugin</artifactId >
75+ <version >1.6.13</version >
76+ <extensions >true</extensions >
77+ <configuration >
78+ <serverId >ossrh</serverId >
79+ <nexusUrl >https://s01.oss.sonatype.org</nexusUrl >
80+ <autoReleaseAfterClose >true</autoReleaseAfterClose >
81+ </configuration >
82+ </plugin >
6283 </plugins >
6384 </build >
6485
You can’t perform that action at this time.
0 commit comments