diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f7fd9c..48421f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,6 @@ name: Publish on: + workflow_call: null push: tags: - "*" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8530ae..8f5af6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,8 +36,10 @@ jobs: publish: npm run dummy-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Invoke publish.yml - if: steps.changesets.outputs.published == 'true' - uses: ./.github/workflows/publish.yaml - secrets: inherit + outputs: + changesets_published: ${{ steps.changesets.outputs.published }} + invoke_publish: + needs: [release] + if: ${{ success() && needs.release.outputs.changesets_published == 'true'}} + uses: ./.github/workflows/publish.yml + secrets: inherit