From d59fae3549e7c5ef14bcf5ccce96bbf8778a6beb Mon Sep 17 00:00:00 2001 From: Clinton Dreisbach Date: Thu, 14 Nov 2024 11:43:22 -0500 Subject: [PATCH] Add conditional dry-run --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3f29b6..bfdd20d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,16 @@ name: Create release and publish to NPM on: workflow_dispatch: + inputs: + dry-run: + description: "Dry run" + default: true + required: false + type: boolean push: branches: - main + jobs: release: name: Build and deploy @@ -41,4 +48,9 @@ jobs: npm config set "//packages.atlassian.com/api/npm/atlassian-npm/:_password" "${ARTIFACTORY_PASSWORD}" - name: Publish (dry-run) + if: inputs.dry-run + run: npm publish --dry-run + + - name: Publish + if: ${{ ! inputs.dry-run }} run: npm publish --dry-run