diff --git a/.github/workflows/netlicensing-client-release.yml b/.github/workflows/netlicensing-client-release.yml index 26afedad..481c2455 100644 --- a/.github/workflows/netlicensing-client-release.yml +++ b/.github/workflows/netlicensing-client-release.yml @@ -14,6 +14,14 @@ jobs: name: Release ${{ github.event.inputs.release-version }} runs-on: self-hosted container: maven:3-amazoncorretto-17 + strategy: + matrix: + java-version: [11, 17] + include: + - java-version: 11 + jdk-suffix: + - java-version: 17 + jdk-suffix: -jdk17 steps: - uses: actions/checkout@v3 @@ -45,12 +53,20 @@ jobs: - name: Import GPG key run: echo "${{ secrets.GPG_KEY }}" | base64 -d | gpg --pinentry-mode loopback --passphrase "${{ secrets.GPG_KEY_PASS }}" --import + - name: Calculate branch suffix + run: | + BRANCH_SUFFIX=${{ matrix.jdk-suffix }} + echo "Branch suffix: '$BRANCH_SUFFIX'" + echo "BRANCH_SUFFIX=$BRANCH_SUFFIX" >> "$GITHUB_ENV" + - name: Release to Maven Central staging run: | mvn -s ~/.m2/settings.xml -B \ clean deploy scm:tag \ -P release \ -Drevision=${{ github.event.inputs.release-version }} \ + -Dsha1=$BRANCH_SUFFIX \ -Dchangelist= \ + -Djava.version=${{ matrix.java-version }} -Dmessage="Release ${{ github.event.inputs.release-version }}" \ -Dgpg.passphrase=${{ secrets.GPG_KEY_PASS }} diff --git a/.github/workflows/netlicesning-client-ci.yml b/.github/workflows/netlicesning-client-ci.yml index 7b905cd7..4a5c30f0 100644 --- a/.github/workflows/netlicesning-client-ci.yml +++ b/.github/workflows/netlicesning-client-ci.yml @@ -28,21 +28,14 @@ jobs: java-version: [11, 17] include: - java-version: 11 - mvn-goal: deploy + jdk-suffix: - java-version: 17 - mvn-goal: verify + jdk-suffix: -jdk17 steps: - uses: actions/checkout@v3 - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java-version }} - distribution: 'adopt' - cache: maven - - name: Prepare maven settings.xml run: | mkdir -p ~/.m2 @@ -64,16 +57,20 @@ jobs: if [ "$GITHUB_REF_NAME" = "master" ] then # No suffix when running against "master" branch - BRANCH_SUFFIX= + BRANCH_SUFFIX=${{ matrix.jdk-suffix }} else # When running from pull request, use "-pr-" suffix, where is a PR number - BRANCH_SUFFIX=-pr-${GITHUB_REF_NAME//\/merge/} + BRANCH_SUFFIX=${{ matrix.jdk-suffix }}-pr-${GITHUB_REF_NAME//\/merge/} fi echo "Branch suffix: '$BRANCH_SUFFIX'" echo "BRANCH_SUFFIX=$BRANCH_SUFFIX" >> "$GITHUB_ENV" - name: Build with Maven - run: mvn -B clean ${{ matrix.mvn-goal }} -Drepo.snapshots.url=${{ secrets.SNAPSHOTS_URL }} -Dsha1=$BRANCH_SUFFIX + run: | + mvn -B clean deploy \ + -Drepo.snapshots.url=${{ secrets.SNAPSHOTS_URL }} \ + -Dsha1=$BRANCH_SUFFIX \ + -Djava.version=${{ matrix.java-version }} - name: Run Demo App run: | diff --git a/pom.xml b/pom.xml index 8bc90c53..8da117d1 100644 --- a/pom.xml +++ b/pom.xml @@ -143,15 +143,15 @@ - - org.apache.maven.plugins - maven-site-plugin - ${maven-site-plugin.version} - - en - UTF-8 - - + + org.apache.maven.plugins + maven-site-plugin + ${maven-site-plugin.version} + + en + UTF-8 + + org.apache.maven.plugins maven-javadoc-plugin