File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 18
18
name : Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }}
19
19
steps :
20
20
- uses : actions/checkout@v4
21
-
22
21
- name : Setup JDK
23
22
uses : actions/setup-java@v4
24
23
with :
29
28
30
29
- name : Build with Maven
31
30
run : mvn test
31
+
32
+ deploy-snapshot :
33
+ runs-on : ubuntu-latest
34
+ needs : build
35
+ if : github.ref == 'refs/heads/main'
36
+
37
+ steps :
38
+ - uses : actions/checkout@v4
39
+ - name : Setup JDK
40
+ uses : actions/setup-java@v4
41
+ with :
42
+ distribution : ' temurin'
43
+ java-version : ' 21'
44
+ cache : ' maven'
45
+ server-id : central
46
+ server-username : CENTRAL_USERNAME
47
+ server-password : CENTRAL_PASSWORD
48
+ gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
49
+
50
+ - name : Deploy Snapshot
51
+ run : mvn -B --no-transfer-progress -Psonatype-oss-release -Prelease-sign-artifacts -DskipTests=true deploy
52
+ env :
53
+ CENTRAL_USERNAME : ${{ secrets.CENTRAL_USERNAME }}
54
+ CENTRAL_PASSWORD : ${{ secrets.CENTRAL_PASSWORD }}
55
+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 185
185
</execution >
186
186
</executions >
187
187
</plugin >
188
+ <plugin >
189
+ <groupId >org.sonatype.central</groupId >
190
+ <artifactId >central-publishing-maven-plugin</artifactId >
191
+ <version >0.7.0</version >
192
+ <extensions >true</extensions >
193
+ <configuration >
194
+ <publishingServerId >central</publishingServerId >
195
+ <centralSnapshotsUrl >https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl >
196
+ </configuration >
197
+ </plugin >
188
198
<plugin >
189
199
<groupId >org.apache.maven.plugins</groupId >
190
200
<artifactId >maven-surefire-plugin</artifactId >
You can’t perform that action at this time.
0 commit comments