From abdb387f336bbf4603fdc07485110125e1360ea8 Mon Sep 17 00:00:00 2001 From: Tomer Figenblat Date: Sat, 10 Feb 2024 23:17:10 -0500 Subject: [PATCH] ci: added debug option to the release workflow Signed-off-by: Tomer Figenblat --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c427b2a..379a8b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,10 @@ on: title: description: "Release title (blank for tag)" required: false + dry-run: + description: "Dry run mode" + required: false + default: false jobs: release: @@ -57,6 +61,7 @@ jobs: run: npm version ${{ steps.bump.outputs.version }} --no-git-tag-version - name: Push new version + if: github.event.inputs.dry-run != 'true' run: | git add package.json package-lock.json git commit -m "build: updated package with ${{ steps.bump.outputs.version }} [skip ci]" @@ -74,6 +79,7 @@ jobs: core.setOutput('value', retval) - name: Create a release + if: github.event.inputs.dry-run != 'true' uses: actions/github-script@v7 with: script: | @@ -86,6 +92,7 @@ jobs: core.setOutput('html_url', response.data.html_url) - name: Publish package + if: github.event.inputs.dry-run != 'true' env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: npm publish --access=public @@ -102,7 +109,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: true + push: ${{ github.event.inputs.dry-run != 'true' }} platforms: ${{ vars.PLATFORMS }} tags: | tomerfi/version-bumper:latest