File tree Expand file tree Collapse file tree 3 files changed +93
-1
lines changed Expand file tree Collapse file tree 3 files changed +93
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Release to Maven Central
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ releaseVersion :
7
+ description : " Release version"
8
+ required : true
9
+
10
+ jobs :
11
+ build :
12
+ name : Release project
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+
17
+ - name : Check out sources
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Set up JDK 17
21
+ uses : actions/setup-java@v3
22
+ with :
23
+ distribution : ' temurin'
24
+ java-version : 17
25
+ cache : ' maven'
26
+
27
+ - name : Install GPG key
28
+ run : |
29
+ echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg.asc
30
+ echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
31
+
32
+ - name : Release to Sonatype OSSRH
33
+ env :
34
+ SONATYPE_USER : ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
35
+ SONATYPE_PASSWORD : ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
36
+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
37
+ run : |
38
+ ./mvnw -B clean install -DskipTests
39
+ ./mvnw -B clean deploy -Psonatype -s settings.xml
40
+
41
+ - name : Setup Graphviz
42
+ uses : ts-graphviz/setup-graphviz@v1
43
+
44
+ - name : Deploy documentation
45
+ env :
46
+ ARTIFACTORY_USERNAME : ${{ secrets.ARTIFACTORY_USERNAME }}
47
+ ARTIFACTORY_PASSWORD : ${{ secrets.ARTIFACTORY_PASSWORD }}
48
+ run : ./mvnw -B clean deploy -Pdocumentation
Original file line number Diff line number Diff line change 794
794
</repository >
795
795
</distributionManagement >
796
796
</profile >
797
+ <profile >
798
+ <id >sonatype</id >
799
+ <properties >
800
+ <maven .test.skip>true</maven .test.skip>
801
+ </properties >
802
+ <build >
803
+ <plugins >
804
+ <plugin >
805
+ <groupId >org.apache.maven.plugins</groupId >
806
+ <artifactId >maven-gpg-plugin</artifactId >
807
+ <executions >
808
+ <execution >
809
+ <id >sign-artifacts</id >
810
+ <phase >verify</phase >
811
+ <goals >
812
+ <goal >sign</goal >
813
+ </goals >
814
+ </execution >
815
+ </executions >
816
+ <configuration >
817
+ <!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
818
+ </configuration >
819
+ </plugin >
820
+ <plugin >
821
+ <groupId >org.sonatype.plugins</groupId >
822
+ <artifactId >nexus-staging-maven-plugin</artifactId >
823
+ <version >1.7.0</version >
824
+ <extensions >true</extensions >
825
+ <configuration >
826
+ <serverId >sonatype-new</serverId >
827
+ <nexusUrl >https://s01.oss.sonatype.org/</nexusUrl >
828
+ <autoReleaseAfterClose >true</autoReleaseAfterClose >
829
+ <keepStagingRepositoryOnFailure >true</keepStagingRepositoryOnFailure >
830
+ </configuration >
831
+ </plugin >
832
+ </plugins >
833
+ </build >
834
+ </profile >
797
835
</profiles >
798
836
799
837
<dependencyManagement >
Original file line number Diff line number Diff line change 35
35
<username >${env.ARTIFACTORY_USERNAME}</username >
36
36
<password >${env.ARTIFACTORY_PASSWORD}</password >
37
37
</server >
38
+
39
+ <server >
40
+ <id >sonatype-new</id >
41
+ <username >${env.SONATYPE_USER}</username >
42
+ <password >${env.SONATYPE_PASSWORD}</password >
43
+ </server >
38
44
</servers >
39
45
40
- </settings >
46
+ </settings >
You can’t perform that action at this time.
0 commit comments