Skip to content

Commit e572d86

Browse files
authored
fix: CD
2 parents 3ba62f4 + f644bf5 commit e572d86

5 files changed

Lines changed: 18 additions & 92 deletions

File tree

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish package to the Maven Central Repository
22
on:
3-
release:
4-
types: [created]
3+
release:
4+
types: [created]
55
jobs:
66
publish:
77
runs-on: ubuntu-latest
@@ -12,22 +12,14 @@ jobs:
1212
with:
1313
java-version: "17"
1414
distribution: "temurin"
15-
server-id: ossrh
15+
server-id: central
1616
server-username: MAVEN_USERNAME
1717
server-password: MAVEN_PASSWORD
18-
- name: Install gpg secret key
19-
run: |
20-
# Install gpg secret key
21-
echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
22-
# Verify that the key ID is shown in the logs
23-
gpg --list-secret-keys --keyid-format LONG | grep "${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}"
18+
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
19+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2420
- name: Publish to Central Repository
2521
env:
2622
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
2723
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
28-
run: |
29-
mvn \
30-
--no-transfer-progress \
31-
--batch-mode \
32-
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
33-
clean deploy
24+
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
25+
run: mvn --batch-mode deploy

node_modules/.pnpm-workspace-state.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

node_modules/.pnpm/lock.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

node_modules/pricing4ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

pom.xml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,6 @@
3737
<url>https://github.com/Alex-GF/pricingplans-4j/tree/main</url>
3838
</scm>
3939

40-
<distributionManagement>
41-
<snapshotRepository>
42-
<id>ossrh</id>
43-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
44-
</snapshotRepository>
45-
<repository>
46-
<id>ossrh</id>
47-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
48-
</repository>
49-
</distributionManagement>
50-
5140
<properties>
5241
<jackson.version>2.14.2</jackson.version>
5342
<aspectj.version>1.9.7</aspectj.version>
@@ -177,8 +166,16 @@
177166
<build>
178167
<finalName>Pricing4Java</finalName>
179168
<plugins>
180-
181-
169+
<plugin>
170+
<groupId>org.sonatype.central</groupId>
171+
<artifactId>central-publishing-maven-plugin</artifactId>
172+
<version>0.8.0</version>
173+
<extensions>true</extensions>
174+
<configuration>
175+
<publishingServerId>central</publishingServerId>
176+
<autoPublish>true</autoPublish>
177+
</configuration>
178+
</plugin>
182179
<plugin>
183180
<groupId>org.apache.maven.plugins</groupId>
184181
<artifactId>maven-gpg-plugin</artifactId>
@@ -191,32 +188,11 @@
191188
<goal>sign</goal>
192189
</goals>
193190
<configuration>
194-
<gpgArguments>
195-
<arg>--pinentry-mode</arg>
196-
<arg>loopback</arg>
197-
</gpgArguments>
198191
</configuration>
199192
</execution>
200193
</executions>
201194
</plugin>
202-
<plugin>
203-
<groupId>org.sonatype.plugins</groupId>
204-
<artifactId>nexus-staging-maven-plugin</artifactId>
205-
<version>1.6.7</version>
206-
<extensions>true</extensions>
207-
<configuration>
208-
<serverId>ossrh</serverId>
209-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
210-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
211-
</configuration>
212-
<dependencies>
213-
<dependency>
214-
<groupId>com.thoughtworks.xstream</groupId>
215-
<artifactId>xstream</artifactId>
216-
<version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
217-
</dependency>
218-
</dependencies>
219-
</plugin>
195+
220196
<plugin>
221197
<artifactId>maven-surefire-plugin</artifactId>
222198
<version>3.5.2</version>

0 commit comments

Comments
 (0)