diff --git a/.github/workflows/onRelease.yml b/.github/workflows/onRelease.yml index 588957c3..63fac708 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 == '' }} + 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 45aeefda..4898b5ed 100644 --- a/.github/workflows/releaseWithCoreBundle.yml +++ b/.github/workflows/releaseWithCoreBundle.yml @@ -1,11 +1,12 @@ name: publish source-tracking-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: @@ -16,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 }}