From 6c2be7db98966a48b9eb3e012f5dae66e3875836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristina=20Isabel=20Ca=C3=B1izales?= Date: Tue, 27 Aug 2024 14:31:20 -0300 Subject: [PATCH] chore: modify workflows to skip publish upon beta release --- .github/workflows/onRelease.yml | 8 ++++++++ .github/workflows/releaseWithCoreBundle.yml | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/onRelease.yml b/.github/workflows/onRelease.yml index 588957c331..10bbf766d6 100644 --- a/.github/workflows/onRelease.yml +++ b/.github/workflows/onRelease.yml @@ -29,3 +29,11 @@ jobs: githubTag: ${{ github.event.release.tag_name || inputs.tag }} secrets: inherit + + publish-bundle: + if: ${{ success() && needs.getDistTag.outputs.tag != 'beta' }} + uses: ./.github/workflows/releaseWithCoreBundle.yml + needs: [getDistTag, npm] + with: + branch: 'main' + secrets: inherit diff --git a/.github/workflows/releaseWithCoreBundle.yml b/.github/workflows/releaseWithCoreBundle.yml index fad3504a4e..a1f7ea741c 100644 --- a/.github/workflows/releaseWithCoreBundle.yml +++ b/.github/workflows/releaseWithCoreBundle.yml @@ -1,10 +1,12 @@ name: publish source-deploy-retrieve-bundle on: - workflow_run: - workflows: - - publish - types: - - completed + workflow_call: + inputs: + branch: + description: 'Set the branch to use for release' + type: string + required: false + default: 'main' workflow_dispatch: inputs: branch: @@ -15,8 +17,8 @@ on: jobs: call-release-workflow: - if: ${{ inputs.branch || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')}} + if: ${{ inputs.branch }} uses: forcedotcom/bundle-publish-scripts/.github/workflows/releaseWithCoreBundle.yml@main secrets: inherit with: - branch: ${{ inputs.branch || 'main' }} + branch: ${{ inputs.branch }}