From d842408f040272fd5ffa310a58c7df22483c7632 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 14 Apr 2022 16:22:50 -0400 Subject: [PATCH] ci: update non-prod build base version number + dry-run option --- .github/workflows/build.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee0a80261..35dc30314 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,10 @@ on: description: 'Skip Tests' required: true type: boolean + dryrun: + description: 'Dry Run' + required: true + type: boolean summary: description: 'Summary' required: false @@ -39,7 +43,7 @@ jobs: fetch-depth: 0 - name: Get Next Version - if: ${{ github.event.inputs.publish == 'true' }} + if: ${{ github.event.inputs.publish == 'true' || github.event.inputs.dryrun == 'true' }} id: semver uses: ietf-tools/semver-action@v1 with: @@ -47,7 +51,7 @@ jobs: branch: main - name: Set Next Version Env Var - if: ${{ github.event.inputs.publish == 'true' }} + if: ${{ github.event.inputs.publish == 'true' || github.event.inputs.dryrun == 'true' }} env: NEXT_VERSION: ${{ steps.semver.outputs.next }} run: | @@ -55,7 +59,7 @@ jobs: - name: Create Draft Release uses: ncipollo/release-action@v1 - if: ${{ github.event.inputs.publish == 'true' }} + if: ${{ github.event.inputs.publish == 'true' && github.event.inputs.dryrun == 'false' }} with: prerelease: true draft: false @@ -81,10 +85,10 @@ jobs: echo "::set-output name=pkg_version_strict::${GITHUB_REF_NAME#?}" echo "::notice::Release created using tag $GITHUB_REF_NAME" else - echo "Using TEST mode: v7.0.0-dev.$GITHUB_RUN_NUMBER" + echo "Using TEST mode: v8.0.0-dev.$GITHUB_RUN_NUMBER" echo "::set-output name=should_deploy::false" - echo "::set-output name=pkg_version::v7.0.0-dev.$GITHUB_RUN_NUMBER" - echo "::set-output name=pkg_version_strict::7.0.0-dev.$GITHUB_RUN_NUMBER" + echo "::set-output name=pkg_version::v8.0.0-dev.$GITHUB_RUN_NUMBER" + echo "::set-output name=pkg_version_strict::8.0.0-dev.$GITHUB_RUN_NUMBER" echo "::notice::Non-production build created using branch $GITHUB_REF_NAME" fi @@ -151,7 +155,7 @@ jobs: # ----------------------------------------------------------------- release: name: Make Release - if: ${{ always() }} + if: ${{ always() && github.event.inputs.dryrun == 'false' }} needs: [tests, prepare] runs-on: ubuntu-latest env: @@ -229,7 +233,7 @@ jobs: - name: Create Release uses: ncipollo/release-action@v1 - if: env.SHOULD_DEPLOY == 'true' + if: ${{ env.SHOULD_DEPLOY == 'true' && github.event.inputs.dryrun == 'false' }} with: allowUpdates: true draft: false