Skip to content

Commit 6ba01b7

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents 200c562 + 1f69b6d commit 6ba01b7

File tree

3 files changed

+50
-26
lines changed

3 files changed

+50
-26
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 }}

testcontainers-advanced-imagebuilder/pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
</properties>
200200
</profile>
201201
<profile>
202-
<id>publish-sonatype-central-portal</id>
202+
<id>publish</id>
203203
<build>
204204
<plugins>
205205
<plugin>
@@ -222,7 +222,7 @@
222222
<plugin>
223223
<groupId>org.apache.maven.plugins</groupId>
224224
<artifactId>maven-gpg-plugin</artifactId>
225-
<version>3.2.7</version>
225+
<version>3.2.8</version>
226226
<executions>
227227
<execution>
228228
<id>sign-artifacts</id>
@@ -241,7 +241,13 @@
241241
</execution>
242242
</executions>
243243
</plugin>
244-
244+
</plugins>
245+
</build>
246+
</profile>
247+
<profile>
248+
<id>publish-sonatype-central-portal</id>
249+
<build>
250+
<plugins>
245251
<plugin>
246252
<groupId>org.sonatype.central</groupId>
247253
<artifactId>central-publishing-maven-plugin</artifactId>

0 commit comments

Comments
 (0)