From d09c2381e88be0ffc1c7bf4ddbfc5b8a9c3d4c65 Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Tue, 16 Jul 2024 13:48:06 +0200 Subject: [PATCH 1/8] #479 Added dryRun --- .github/workflows/release.yml | 36 +++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 811cfe0cb4..6333374c95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,34 +4,42 @@ name: Release on: workflow_dispatch: inputs: - java_version: - description: Java version to use - type: string - required: false - default: 17 - branch: - description: "The branch to checkout when cutting the release." - required: true - default: "master" releaseVersion: - description: "Default version to use when preparing a release." + description: 'The release version' required: true - default: "X.Y.Z" developmentVersion: - description: "Default version to use for new local working copy." + description: 'The development version' + required: true + dryRun: + description: 'Whether to perform a dry run' required: true - default: "X.Y.Z-SNAPSHOT" + default: 'false' + type: boolean jobs: + dry-run: + if: ${{ github.event.inputs.dryRun }} + runs-on: ubuntu-latest + steps: + - name: Perform Dry Run + run: | + mvn release:prepare release:perform \ + -ntp \ + --batch-mode \ + -DreleaseVersion=${{ inputs.releaseVersion }} \ + -DdevelopmentVersion=${{ inputs.developmentVersion }} \ + -DdryRun=${{ inputs.dryRun }} build: + needs: dry-run uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@main with: branch: ${{ github.event.inputs.branch }} releaseVersion: ${{ github.event.inputs.releaseVersion }} developmentVersion: ${{ github.event.inputs.developmentVersion }} + dryRun: ${{ github.event.inputs.dryRun }} secrets: ossrh_username: ${{ secrets.OSSRH_USERNAME }} ossrh_password: ${{ secrets.OSSRH_PASSWORD }} ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }} - sonar_token: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + sonar_token: ${{ secrets.SONAR_TOKEN }} From 5b0b946161bbcb1dc098c8f39ae9e32486303938 Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Tue, 16 Jul 2024 14:30:49 +0200 Subject: [PATCH 2/8] #479 Changed to work on dryRun branch --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6333374c95..4e91b16bba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: -DdryRun=${{ inputs.dryRun }} build: needs: dry-run - uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@main + uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@dryrun with: branch: ${{ github.event.inputs.branch }} releaseVersion: ${{ github.event.inputs.releaseVersion }} From d7c538d8e8de8e560c6d5231cbaf523d53fe982a Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Wed, 17 Jul 2024 10:33:09 +0200 Subject: [PATCH 3/8] #479 cleaned release.yml Changed to work on feature/dry-run branch --- .github/workflows/release.yml | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e91b16bba..abd421f37f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,34 +4,31 @@ name: Release on: workflow_dispatch: inputs: + java_version: + description: Java version to use + type: string + required: false + default: 17 + branch: + description: "The branch to checkout when cutting the release." + required: true + default: "dryrun" releaseVersion: - description: 'The release version' + description: "Default version to use when preparing a release." required: true + default: "X.Y.Z" developmentVersion: - description: 'The development version' + description: "Default version to use for new local working copy." required: true + default: "X.Y.Z-SNAPSHOT" dryRun: - description: 'Whether to perform a dry run' + description: "Whether to perform a dry run" required: true - default: 'false' - type: boolean - + default: false jobs: - dry-run: - if: ${{ github.event.inputs.dryRun }} - runs-on: ubuntu-latest - steps: - - name: Perform Dry Run - run: | - mvn release:prepare release:perform \ - -ntp \ - --batch-mode \ - -DreleaseVersion=${{ inputs.releaseVersion }} \ - -DdevelopmentVersion=${{ inputs.developmentVersion }} \ - -DdryRun=${{ inputs.dryRun }} build: needs: dry-run - uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@dryrun + uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@feature/dry-run with: branch: ${{ github.event.inputs.branch }} releaseVersion: ${{ github.event.inputs.releaseVersion }} @@ -43,3 +40,4 @@ jobs: ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }} sonar_token: ${{ secrets.SONAR_TOKEN }} + From 29e8176b5deffb1e95a757713fe10295c09d76d6 Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Wed, 17 Jul 2024 10:35:13 +0200 Subject: [PATCH 4/8] #479 created a checkbox or the dry run release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abd421f37f..3bfdcb3c9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ on: description: "Whether to perform a dry run" required: true default: false + type: boolean jobs: build: needs: dry-run From a62d438e335948f4f3057a0cc1fd9ffe0eb38cc3 Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Wed, 17 Jul 2024 10:39:27 +0200 Subject: [PATCH 5/8] #479 bug fixed removed a needs --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bfdcb3c9a..f61a713b77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,13 +22,12 @@ on: required: true default: "X.Y.Z-SNAPSHOT" dryRun: - description: "Whether to perform a dry run" + description: "Perform a dry run" required: true default: false type: boolean jobs: build: - needs: dry-run uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@feature/dry-run with: branch: ${{ github.event.inputs.branch }} @@ -41,4 +40,3 @@ jobs: ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }} sonar_token: ${{ secrets.SONAR_TOKEN }} - From f005487e0b177f1d647c02f8715e720071c9e9d6 Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Wed, 17 Jul 2024 11:09:09 +0200 Subject: [PATCH 6/8] #479 bug fix Unexpected value 'true' --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f61a713b77..d12e746f9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: branch: ${{ github.event.inputs.branch }} releaseVersion: ${{ github.event.inputs.releaseVersion }} developmentVersion: ${{ github.event.inputs.developmentVersion }} - dryRun: ${{ github.event.inputs.dryRun }} + dryRun: ${{ github.event.inputs.dryRun == 'true' }} secrets: ossrh_username: ${{ secrets.OSSRH_USERNAME }} ossrh_password: ${{ secrets.OSSRH_PASSWORD }} From f27a066c135a061e5f753992b4b84628dac8b612 Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Wed, 17 Jul 2024 11:25:51 +0200 Subject: [PATCH 7/8] #479 cleaned dryRun code --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d12e746f9c..f61a713b77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: branch: ${{ github.event.inputs.branch }} releaseVersion: ${{ github.event.inputs.releaseVersion }} developmentVersion: ${{ github.event.inputs.developmentVersion }} - dryRun: ${{ github.event.inputs.dryRun == 'true' }} + dryRun: ${{ github.event.inputs.dryRun }} secrets: ossrh_username: ${{ secrets.OSSRH_USERNAME }} ossrh_password: ${{ secrets.OSSRH_PASSWORD }} From 13c8f9a2ffea7bfa347f91997230afbae2998a7b Mon Sep 17 00:00:00 2001 From: Yass Almardoud Date: Wed, 17 Jul 2024 12:06:12 +0200 Subject: [PATCH 8/8] #479 adjusted for master branch --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f61a713b77..8f4dd33a95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ on: branch: description: "The branch to checkout when cutting the release." required: true - default: "dryrun" + default: "master" releaseVersion: description: "Default version to use when preparing a release." required: true @@ -28,7 +28,7 @@ on: type: boolean jobs: build: - uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@feature/dry-run + uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@main with: branch: ${{ github.event.inputs.branch }} releaseVersion: ${{ github.event.inputs.releaseVersion }}