Skip to content

Commit 22d887c

Browse files
committed
feat: upgraded version and changed to new sonatype workflow
1 parent 9407f5c commit 22d887c

File tree

4 files changed

+32
-37
lines changed

4 files changed

+32
-37
lines changed

.github/workflows/release-to-maven-central.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ jobs:
1414
- run: |
1515
echo "Release version ${{ github.event.inputs.releaseversion }}!"
1616
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818

1919
- name: Set up Maven Central Repository
20-
uses: actions/setup-java@v1
20+
uses: actions/setup-java@v4
2121
with:
2222
java-version: 17
23-
server-id: ossrh
23+
distribution: 'temurin'
24+
server-id: central
2425
server-username: MAVEN_USERNAME
2526
server-password: MAVEN_PASSWORD
26-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
27-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
27+
28+
- name: Install GPG Secret Key
29+
run: |
30+
cat <(echo -e "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}") | gpg --batch --import
31+
gpg --list-secret-keys --keyid-format LONG
2832
2933
- name: Set projects Maven version to GitHub Action GUI set version
3034
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"
3135

3236
- name: Publish package
33-
run: mvn --batch-mode clean deploy -P release -DskipTests=true
37+
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} -Dgpg.pinentry-mode=loopback clean deploy -DskipTests
3438
env:
3539
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
3640
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
37-
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
3841

3942
- name: Create GitHub Release
40-
id: create_release
41-
uses: actions/create-release@v1
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
uses: ncipollo/release-action@v1
4444
with:
45-
tag_name: ${{ github.event.inputs.releaseversion }}
46-
release_name: ${{ github.event.inputs.releaseversion }}
45+
tag: ${{ github.event.inputs.releaseversion }}
46+
name: ${{ github.event.inputs.releaseversion }}
4747
body: |
4848
New version ${{ github.event.inputs.releaseversion }} published
4949
draft: false

email-template-builder-markdown/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</parent>
1212

1313
<artifactId>email-template-builder-markdown</artifactId>
14+
<name>Email Template Builder Markdown</name>
1415

1516
<dependencies>
1617
<dependency>

email-template-builder/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</parent>
1212

1313
<artifactId>email-template-builder</artifactId>
14+
<name>Email Template Builder</name>
1415

1516
<dependencies>
1617
<dependency>

pom.xml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,18 @@ SOFTWARE.
7070
</developer>
7171
</developers>
7272

73-
<distributionManagement>
74-
<snapshotRepository>
75-
<id>ossrh</id>
76-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
77-
</snapshotRepository>
78-
<repository>
79-
<id>ossrh</id>
80-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
81-
</repository>
82-
</distributionManagement>
83-
8473
<properties>
8574
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8675
<maven.compiler.source>17</maven.compiler.source>
8776
<maven.compiler.target>17</maven.compiler.target>
8877
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
89-
<pebble.version>3.2.2</pebble.version>
90-
<lombok.version>1.18.32</lombok.version>
91-
<junit.version>5.10.2</junit.version>
78+
<pebble.version>3.2.4</pebble.version>
79+
<lombok.version>1.18.36</lombok.version>
80+
<junit.version>5.12.2</junit.version>
9281
<hamcrest.version>2.2</hamcrest.version>
9382
<colors.version>0.6.0</colors.version>
94-
<commonmark.version>0.22.0</commonmark.version>
95-
<simple-java-mail.version>8.10.1</simple-java-mail.version>
83+
<commonmark.version>0.25.0</commonmark.version>
84+
<simple-java-mail.version>8.12.6</simple-java-mail.version>
9685
</properties>
9786

9887
<dependencies>
@@ -110,14 +99,14 @@ SOFTWARE.
11099
<build>
111100
<plugins>
112101
<plugin>
113-
<groupId>org.sonatype.plugins</groupId>
114-
<artifactId>nexus-staging-maven-plugin</artifactId>
115-
<version>1.6.13</version>
102+
<groupId>org.sonatype.central</groupId>
103+
<artifactId>central-publishing-maven-plugin</artifactId>
104+
<version>0.8.0</version>
116105
<extensions>true</extensions>
117106
<configuration>
118-
<serverId>ossrh</serverId>
119-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
120-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
107+
<publishingServerId>central</publishingServerId>
108+
<autoPublish>true</autoPublish>
109+
<waitUntil>published</waitUntil>
121110
</configuration>
122111
</plugin>
123112
<plugin>
@@ -136,7 +125,7 @@ SOFTWARE.
136125
<plugin>
137126
<groupId>org.apache.maven.plugins</groupId>
138127
<artifactId>maven-javadoc-plugin</artifactId>
139-
<version>3.6.3</version>
128+
<version>3.11.2</version>
140129
<executions>
141130
<execution>
142131
<id>attach-javadocs</id>
@@ -152,14 +141,18 @@ SOFTWARE.
152141
<plugin>
153142
<groupId>org.apache.maven.plugins</groupId>
154143
<artifactId>maven-gpg-plugin</artifactId>
155-
<version>3.2.4</version>
144+
<version>3.2.8</version>
156145
<executions>
157146
<execution>
158147
<id>sign-artifacts</id>
159148
<phase>verify</phase>
160149
<goals>
161150
<goal>sign</goal>
162151
</goals>
152+
<configuration>
153+
<showFiles>true</showFiles>
154+
<displayFingerprint>true</displayFingerprint>
155+
</configuration>
163156
</execution>
164157
</executions>
165158
</plugin>

0 commit comments

Comments
 (0)