diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 868a804a..18318e0c 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,9 +15,9 @@ on: jobs: build-and-publish: - # ['Unit Tests', 'Code Check']工作流成功完成 + # git tags中包含Publish 且 ['Unit Tests', 'Code Check']工作流成功完成 if: > - github.event.workflow_run.conclusion == 'success' + startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'Publish') && github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest steps: - name: Check out code