From e7dae0718007cbb3e205e0c42a50165e8465f6ce Mon Sep 17 00:00:00 2001 From: Carles Arnal Date: Fri, 9 Dec 2022 13:15:57 +0100 Subject: [PATCH 1/2] Revert "[Proposal] Use version from git" --- .github/workflows/release.yaml | 73 +++++++++++++++++++++++++++++++++- .mvn/extensions.xml | 8 ---- .mvn/jgitver.config.xml | 10 ----- README.md | 9 ----- cli/pom.xml | 2 +- core/pom.xml | 2 +- maven-plugin-tests/pom.xml | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- 9 files changed, 77 insertions(+), 33 deletions(-) delete mode 100644 .mvn/extensions.xml delete mode 100644 .mvn/jgitver.config.xml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8be10fc5..00917e92 100755 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,27 +29,33 @@ jobs: java-version: '11' cache: maven + - name: Check Java Version run: java -version + - name: Set up Maven uses: stCarolas/setup-maven@v4 with: maven-version: '3.6.3' + - name: Check Maven Version run: mvn --version + - name: Log Metadata run: | echo "Releasing Apicurio Codegen version ${{ github.event.inputs.release-version }} from branch ${{ github.event.inputs.branch }}" echo "Next Snapshot version will be ${{ github.event.inputs.snapshot-version }}" + - name: Set up settings.xml run: | echo "${{ 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: Configure Git run: | git init @@ -59,23 +65,35 @@ jobs: git pull echo "#### Listing files ####" find . + # To avoid permission denied issues - name: Give full Permissions run: chmod -R 777 $(pwd) + - name: Update Release Version ${{ github.event.inputs.release-version }} - run: git tag ${{ 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 . + git commit -m "Automated version update: ${{ github.event.inputs.release-version}}" + git push + + - name: Import GPG Key uses: crazy-max/ghaction-import-gpg@v1 env: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + - name: Maven Deploy run: | # Retry 3 times before the steps actually fails @@ -160,3 +178,56 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: options: '--override' + + set-next-snapshot: + needs: release-native-binaries + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.branch}} + + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + cache: maven + + - name: Check Java Version + run: java -version + + - name: Set up Maven + uses: stCarolas/setup-maven@v4 + with: + maven-version: '3.6.3' + + - name: Check Maven Version + run: mvn --version + + - name: Update Snapshot version ${{ github.event.inputs.snapshot-version}} + run: mvn versions:set -DnewVersion=${{ github.event.inputs.snapshot-version}} -DgenerateBackupPoms=false -DprocessAllModules=true + + - name: Configure Git + run: | + git init + git config --global user.name "apicurio-ci" + git config --global user.email "apicurio.ci@gmail.com" + git branch --set-upstream-to=origin/${{ github.event.inputs.branch}} + git pull + echo "#### Listing files ####" + find . + + - name: Commit Snapshot Version Change + run: | + git add . + git commit -m"Automated version update: ${{ github.event.inputs.snapshot-version}}" + git push + + - name: Google Chat Notification + if: ${{ failure() }} + uses: Co-qn/google-chat-notification@releases/v1 + with: + name: ${{ github.workflow }} + url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }} + status: ${{ job.status }} diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml deleted file mode 100644 index e37bfc61..00000000 --- a/.mvn/extensions.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - fr.brouillard.oss - jgitver-maven-plugin - 1.8.0 - - diff --git a/.mvn/jgitver.config.xml b/.mvn/jgitver.config.xml deleted file mode 100644 index 26fd0077..00000000 --- a/.mvn/jgitver.config.xml +++ /dev/null @@ -1,10 +0,0 @@ - - MAVEN - false - false - true - main - (([0-9]+)\.([0-9]+)\.([0-9]+))\.Final - diff --git a/README.md b/README.md index 6fb6be3b..ff89888c 100755 --- a/README.md +++ b/README.md @@ -1,11 +1,2 @@ # apicurio-codegen - Repository to hold some code generation utilities. - -## Build - -If you are compiling this project from sources without git/git history make sure to pass the appropriate version to the `mvn` commands e.g.: - -``` -mvn -Djgitver.use-version= -``` diff --git a/cli/pom.xml b/cli/pom.xml index 987d3a1d..2ec67dd2 100755 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -9,7 +9,7 @@ io.apicurio apicurio-codegen-parent - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml diff --git a/core/pom.xml b/core/pom.xml index edc86c4a..f608e183 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -9,7 +9,7 @@ io.apicurio apicurio-codegen-parent - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml diff --git a/maven-plugin-tests/pom.xml b/maven-plugin-tests/pom.xml index 24b7547c..454442d2 100755 --- a/maven-plugin-tests/pom.xml +++ b/maven-plugin-tests/pom.xml @@ -6,7 +6,7 @@ io.apicurio apicurio-codegen-parent - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 41e01368..df908541 100755 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -6,7 +6,7 @@ io.apicurio apicurio-codegen-parent - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 6e8229e1..b3212bf5 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.apicurio apicurio-codegen-parent - 999-SNAPSHOT + 1.0.13-SNAPSHOT apicurio-codegen-parent pom From c255c6268d9fe54338bc1fff9bb514a74968e453 Mon Sep 17 00:00:00 2001 From: Carles Arnal Date: Fri, 9 Dec 2022 13:42:20 +0100 Subject: [PATCH 2/2] Fix quarkus extension version --- quarkus-extension/deployment/pom.xml | 2 +- quarkus-extension/integration-tests/pom.xml | 2 +- quarkus-extension/pom.xml | 4 ++-- quarkus-extension/runtime/pom.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/quarkus-extension/deployment/pom.xml b/quarkus-extension/deployment/pom.xml index 676e0879..64220ba9 100644 --- a/quarkus-extension/deployment/pom.xml +++ b/quarkus-extension/deployment/pom.xml @@ -5,7 +5,7 @@ apicurio-codegen-quarkus-extension-parent io.apicurio - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml 4.0.0 diff --git a/quarkus-extension/integration-tests/pom.xml b/quarkus-extension/integration-tests/pom.xml index 61a85c57..94704c46 100644 --- a/quarkus-extension/integration-tests/pom.xml +++ b/quarkus-extension/integration-tests/pom.xml @@ -5,7 +5,7 @@ apicurio-codegen-quarkus-extension-parent io.apicurio - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml 4.0.0 diff --git a/quarkus-extension/pom.xml b/quarkus-extension/pom.xml index bdad6d68..c3d1dd53 100644 --- a/quarkus-extension/pom.xml +++ b/quarkus-extension/pom.xml @@ -7,13 +7,13 @@ io.apicurio apicurio-codegen-parent - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml apicurio-codegen-quarkus-extension-parent pom - 999-SNAPSHOT + 1.0.13-SNAPSHOT deployment diff --git a/quarkus-extension/runtime/pom.xml b/quarkus-extension/runtime/pom.xml index 52a3df01..c44dd715 100644 --- a/quarkus-extension/runtime/pom.xml +++ b/quarkus-extension/runtime/pom.xml @@ -6,7 +6,7 @@ apicurio-codegen-quarkus-extension-parent io.apicurio - 999-SNAPSHOT + 1.0.13-SNAPSHOT ../pom.xml 4.0.0