Skip to content

Update from template (auto-merged) #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,7 @@ jobs:
git config --global user.name "GitHub Actions"

- name: Un-SNAP
run: |
mvnwPath=$(readlink -f ./mvnw)
modules=("") # root
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
for i in "${modules[@]}"
do
echo "Processing $i/pom.xml"
(cd "$i" && $mvnwPath -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
done
run: ./mvnw -B versions:set -DremoveSnapshot -DprocessAllModules -DgenerateBackupPoms=false

- name: Get version
id: version
Expand Down Expand Up @@ -112,6 +104,9 @@ jobs:
runs-on: ubuntu-latest
needs: [prepare-release]
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

Expand All @@ -120,20 +115,34 @@ jobs:
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git pull

- name: Set up JDK
uses: actions/setup-java@v4
with: # running setup-java overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to Central Portal
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}

- name: Set up JDK
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
java-version: '17'
distribution: 'temurin'
java-version: '17'
server-id: sonatype-central-portal
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

- name: Publish to Central Portal
run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
Expand Down Expand Up @@ -185,15 +194,7 @@ jobs:
git pull

- name: Inc Version and SNAP
run: |
mvnwPath=$(readlink -f ./mvnw)
modules=("") # root
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
for i in "${modules[@]}"
do
echo "Processing $i/pom.xml"
(cd "$i" && $mvnwPath -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true -DupdateMatchingVersions=false)
done
run: ./mvnw -B versions:set -DnextSnapshot -DprocessAllModules -DgenerateBackupPoms=false

- name: Git Commit and Push
run: |
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,26 @@ jobs:
publish-maven:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with: # running setup-java overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to GitHub Packages
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

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

- name: Publish to Central Portal
run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.26.0</version>
<version>10.26.1</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -82,12 +82,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.14.0</version>
<version>7.15.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.14.0</version>
<version>7.15.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
18 changes: 12 additions & 6 deletions sessionize-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
</build>
<profiles>
<profile>
<id>publish-sonatype-central-portal</id>
<id>publish</id>
<build>
<plugins>
<plugin>
Expand All @@ -240,7 +240,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -259,7 +259,13 @@
</execution>
</executions>
</plugin>

</plugins>
</build>
</profile>
<profile>
<id>publish-sonatype-central-portal</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
Expand Down Expand Up @@ -443,7 +449,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.26.0</version>
<version>10.26.1</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -484,12 +490,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.14.0</version>
<version>7.15.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.14.0</version>
<version>7.15.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down