From 539adf3e819e923082ea8963da99f601cbc223b2 Mon Sep 17 00:00:00 2001 From: Carles Arnal Date: Wed, 20 Nov 2024 10:40:54 +0100 Subject: [PATCH] Fix java version --- .github/scripts/create-github-release.sh | 4 +- .github/workflows/release.yaml | 50 +++++------ .github/workflows/verify.yaml | 16 ++-- pom.xml | 102 ++++++++++++++++++++++- 4 files changed, 131 insertions(+), 41 deletions(-) mode change 100644 => 100755 .github/scripts/create-github-release.sh diff --git a/.github/scripts/create-github-release.sh b/.github/scripts/create-github-release.sh old mode 100644 new mode 100755 index 7b2018f..1755252 --- a/.github/scripts/create-github-release.sh +++ b/.github/scripts/create-github-release.sh @@ -6,7 +6,7 @@ BRANCH="$2" REPOSITORY="$3" ACCESS_TOKEN="$4" -generate_post_data() +generate_post_data() { cat <${{ secrets.OSSRH_ID }}${{ secrets.OSSRH_USERNAME }}${{ secrets.OSSRH_TOKEN }}${{ secrets.OSSRH_ID }}truegpg${{ secrets.GPG_PASSPHRASE}}" > /home/runner/.m2/settings.xml cat /home/runner/.m2/settings.xml - - - - name: Apicurio Common Client Code Checkout - run: | - git init - git config --global user.name "apicurio-ci" - git config --global user.email "apicurio.ci@gmail.com" - git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" - git fetch - git checkout ${{ github.event.inputs.branch}} - git branch --set-upstream-to=origin/${{ github.event.inputs.branch}} - git pull - echo "#### Listing files after clone ####" - find . - - - name: Update Release Version ${{ github.event.inputs.release-version}} run: mvn versions:set -DnewVersion=${{ github.event.inputs.release-version}} -DgenerateBackupPoms=false -DprocessAllModules=true - - name: Verify Build run: mvn clean install - - name: Commit Release Version Change run: | git add . @@ -85,11 +77,9 @@ jobs: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - name: Create GitHub Release run: ./.github/scripts/create-github-release.sh ${{ github.event.inputs.release-version}} ${{ github.event.inputs.branch}} $GITHUB_REPOSITORY ${{ secrets.GITHUB_TOKEN }} - - name: Maven Deploy run: | # Retry 3 times before the steps actually fails @@ -100,11 +90,9 @@ jobs: (echo "===== Maven Deploy Attempt: 3 ====" && mvn deploy -Prelease --batch-mode --settings /home/runner/.m2/settings.xml -DskipTests) || \ (echo "==== Maven Deploy Step Failed ====" && exit 1) - - name: Update Snapshot version ${{ github.event.inputs.snapshot-version}} run: mvn versions:set -DnewVersion=${{ github.event.inputs.snapshot-version}} -DgenerateBackupPoms=false -DprocessAllModules=true - - name: Commit Snapshot Version Change run: | git add . diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 74aeccd..7c2f45b 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -20,13 +20,18 @@ on: jobs: build-verify: name: Verify Build - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: github.repository_owner == 'Apicurio' steps: - - uses: actions/setup-java@v2 + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: '17' + java-version: 17 + distribution: 'temurin' + cache: 'maven' - name: Check Java Version run: java -version @@ -39,8 +44,5 @@ jobs: - name: Check Maven Version run: mvn --version - - name: Checkout Code - uses: actions/checkout@v2 - - name: Build Project run: mvn clean install \ No newline at end of file diff --git a/pom.xml b/pom.xml index b3613ee..2ebd7ab 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,33 @@ maven-plugin + https://www.apicur.io/ + Apicurio Maven Plugin. + + + Red Hat + https://www.redhat.com/ + + + + + Apache License Version 2.0 + https://repository.jboss.org/licenses/apache-2.0.txt + repo + + + + + GitHub + https://github.com/Apicurio/apicurio-maven-plugin/issues + + + + scm:git:git@github.com:apicurio/apicurio-registry-schema-validation.git + scm:git:git@github.com:apicurio/apicurio-registry-schema-validation.git + scm:git:git@github.com:apicurio/apicurio-registry-schema-validation.git + + 17 17 @@ -62,7 +89,80 @@ true + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.8.0 + + + attach-javadocs + + jar + + + + - + + + release + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + true + + ossrh + https://oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + + + --pinentry-mode + loopback + + + + + + + + + + + \ No newline at end of file