Skip to content

Commit 09e3359

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents 11cef50 + 1f69b6d commit 09e3359

File tree

4 files changed

+56
-32
lines changed

4 files changed

+56
-32
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,7 @@ jobs:
6161
git config --global user.name "GitHub Actions"
6262
6363
- name: Un-SNAP
64-
run: |
65-
mvnwPath=$(readlink -f ./mvnw)
66-
modules=("") # root
67-
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
68-
for i in "${modules[@]}"
69-
do
70-
echo "Processing $i/pom.xml"
71-
(cd "$i" && $mvnwPath -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
72-
done
64+
run: ./mvnw -B versions:set -DremoveSnapshot -DprocessAllModules -DgenerateBackupPoms=false
7365

7466
- name: Get version
7567
id: version
@@ -112,6 +104,9 @@ jobs:
112104
runs-on: ubuntu-latest
113105
needs: [prepare-release]
114106
timeout-minutes: 60
107+
permissions:
108+
contents: read
109+
packages: write
115110
steps:
116111
- uses: actions/checkout@v4
117112

@@ -120,20 +115,34 @@ jobs:
120115
git config --global user.email "[email protected]"
121116
git config --global user.name "GitHub Actions"
122117
git pull
118+
119+
- name: Set up JDK
120+
uses: actions/setup-java@v4
121+
with: # running setup-java overwrites the settings.xml
122+
distribution: 'temurin'
123+
java-version: '17'
124+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
125+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
123126

127+
- name: Publish to Central Portal
128+
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
129+
env:
130+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
132+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
133+
124134
- name: Set up JDK
125135
uses: actions/setup-java@v4
126136
with: # running setup-java again overwrites the settings.xml
127-
java-version: '17'
128137
distribution: 'temurin'
138+
java-version: '17'
129139
server-id: sonatype-central-portal
130140
server-username: MAVEN_CENTRAL_USERNAME
131141
server-password: MAVEN_CENTRAL_TOKEN
132142
gpg-passphrase: MAVEN_GPG_PASSPHRASE
133-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
134143

135144
- name: Publish to Central Portal
136-
run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests
145+
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
137146
env:
138147
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
139148
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
@@ -185,15 +194,7 @@ jobs:
185194
git pull
186195
187196
- name: Inc Version and SNAP
188-
run: |
189-
mvnwPath=$(readlink -f ./mvnw)
190-
modules=("") # root
191-
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
192-
for i in "${modules[@]}"
193-
do
194-
echo "Processing $i/pom.xml"
195-
(cd "$i" && $mvnwPath -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true -DupdateMatchingVersions=false)
196-
done
197+
run: ./mvnw -B versions:set -DnextSnapshot -DprocessAllModules -DgenerateBackupPoms=false
197198

198199
- name: Git Commit and Push
199200
run: |

.github/workflows/test-deploy.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,26 @@ jobs:
1010
publish-maven:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 60
13+
permissions:
14+
contents: read
15+
packages: write
1316
steps:
1417
- uses: actions/checkout@v4
18+
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with: # running setup-java overwrites the settings.xml
22+
distribution: 'temurin'
23+
java-version: '17'
24+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
25+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
26+
27+
- name: Publish to GitHub Packages
28+
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
29+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
1533

1634
- name: Set up JDK
1735
uses: actions/setup-java@v4
@@ -22,10 +40,9 @@ jobs:
2240
server-username: MAVEN_CENTRAL_USERNAME
2341
server-password: MAVEN_CENTRAL_TOKEN
2442
gpg-passphrase: MAVEN_GPG_PASSPHRASE
25-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2643

2744
- name: Publish to Central Portal
28-
run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests
45+
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
2946
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
3047
env:
3148
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>10.26.0</version>
48+
<version>10.26.1</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -82,12 +82,12 @@
8282
<dependency>
8383
<groupId>net.sourceforge.pmd</groupId>
8484
<artifactId>pmd-core</artifactId>
85-
<version>7.14.0</version>
85+
<version>7.15.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>net.sourceforge.pmd</groupId>
8989
<artifactId>pmd-java</artifactId>
90-
<version>7.14.0</version>
90+
<version>7.15.0</version>
9191
</dependency>
9292
</dependencies>
9393
</plugin>

testcontainers-selenium/pom.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
</properties>
259259
</profile>
260260
<profile>
261-
<id>publish-sonatype-central-portal</id>
261+
<id>publish</id>
262262
<build>
263263
<plugins>
264264
<plugin>
@@ -281,7 +281,7 @@
281281
<plugin>
282282
<groupId>org.apache.maven.plugins</groupId>
283283
<artifactId>maven-gpg-plugin</artifactId>
284-
<version>3.2.7</version>
284+
<version>3.2.8</version>
285285
<executions>
286286
<execution>
287287
<id>sign-artifacts</id>
@@ -300,7 +300,13 @@
300300
</execution>
301301
</executions>
302302
</plugin>
303-
303+
</plugins>
304+
</build>
305+
</profile>
306+
<profile>
307+
<id>publish-sonatype-central-portal</id>
308+
<build>
309+
<plugins>
304310
<plugin>
305311
<groupId>org.sonatype.central</groupId>
306312
<artifactId>central-publishing-maven-plugin</artifactId>
@@ -326,7 +332,7 @@
326332
<dependency>
327333
<groupId>com.puppycrawl.tools</groupId>
328334
<artifactId>checkstyle</artifactId>
329-
<version>10.26.0</version>
335+
<version>10.26.1</version>
330336
</dependency>
331337
</dependencies>
332338
<configuration>
@@ -363,12 +369,12 @@
363369
<dependency>
364370
<groupId>net.sourceforge.pmd</groupId>
365371
<artifactId>pmd-core</artifactId>
366-
<version>7.14.0</version>
372+
<version>7.15.0</version>
367373
</dependency>
368374
<dependency>
369375
<groupId>net.sourceforge.pmd</groupId>
370376
<artifactId>pmd-java</artifactId>
371-
<version>7.14.0</version>
377+
<version>7.15.0</version>
372378
</dependency>
373379
</dependencies>
374380
</plugin>

0 commit comments

Comments
 (0)