File tree Expand file tree Collapse file tree 3 files changed +42
-230
lines changed Expand file tree Collapse file tree 3 files changed +42
-230
lines changed Original file line number Diff line number Diff line change 1- # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2- # For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
3-
41name : Maven Package
52
63on :
74 release :
85 types : [created]
96
107jobs :
11- build :
8+ publish :
129
1310 runs-on : ubuntu-latest
1411
3936 run : mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
4037
4138 - name : Publish to Apache Maven Central
42- run : mvn deploy
39+ run : mvn deploy -PossrhDeploy
4340 env :
4441 MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
4542 MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
5148 java-version : 1.8
5249 server-id : github
5350
54- - name : Temporary multi-pom hack
55- run : mv -f pomgh.xml pom.xml
56-
57- - name : Build with Maven
58- run : mvn -B package --file pom.xml
59-
60- - name : Update package version
61- run : mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
62-
6351 - name : Publish to GitHub Packages Apache Maven
64- run : mvn deploy
52+ run : mvn deploy -PgithubDeploy
6553 env :
6654 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6755
Original file line number Diff line number Diff line change 6060 <url >https://www.cicirello.org/</url >
6161 </organization >
6262
63+ <profiles >
64+ <profile >
65+ <id >ossrhDeploy</id >
6366 <distributionManagement >
6467 <repository >
6568 <id >ossrh</id >
7275 <url >https://oss.sonatype.org/content/repositories/snapshots</url >
7376 </snapshotRepository >
7477 </distributionManagement >
75-
78+ <build >
79+ <plugins >
80+ <plugin >
81+ <groupId >org.apache.maven.plugins</groupId >
82+ <artifactId >maven-gpg-plugin</artifactId >
83+ <version >1.6</version >
84+ <executions >
85+ <execution >
86+ <id >sign-artifacts</id >
87+ <phase >verify</phase >
88+ <goals >
89+ <goal >sign</goal >
90+ </goals >
91+ <configuration >
92+ <gpgArguments >
93+ <arg >--pinentry-mode</arg >
94+ <arg >loopback</arg >
95+ </gpgArguments >
96+ </configuration >
97+ </execution >
98+ </executions >
99+ </plugin >
100+ </plugins >
101+ </build >
102+ </profile >
103+ <profile >
104+ <id >githubDeploy</id >
105+ <distributionManagement >
106+ <repository >
107+ <id >github</id >
108+ <name >GitHub cicirello Apache Maven Packages</name >
109+ <url >https://maven.pkg.github.com/cicirello/JavaPermutationTools</url >
110+ </repository >
111+ </distributionManagement >
112+ </profile >
113+ </profiles >
76114
77115 <issueManagement >
78116 <system >github</system >
174212 </includes >
175213 </configuration >
176214 </plugin >
177- <plugin >
178- <groupId >org.apache.maven.plugins</groupId >
179- <artifactId >maven-gpg-plugin</artifactId >
180- <version >1.6</version >
181- <executions >
182- <execution >
183- <id >sign-artifacts</id >
184- <phase >verify</phase >
185- <goals >
186- <goal >sign</goal >
187- </goals >
188- <configuration >
189- <gpgArguments >
190- <arg >--pinentry-mode</arg >
191- <arg >loopback</arg >
192- </gpgArguments >
193- </configuration >
194- </execution >
195- </executions >
196- </plugin >
197215 </plugins >
198216 </build >
199217
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments