File tree Expand file tree Collapse file tree 3 files changed +10
-13
lines changed
Expand file tree Collapse file tree 3 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,15 @@ name: Publish NPM package
22permissions :
33 contents : write
44on :
5- workflow_run :
6- workflows : ["Run Tests"]
5+ push :
76 tags :
87 - ' *'
9- types :
10- - completed
118jobs :
9+ tests :
10+ uses : ./.github/workflows/tests.yml # Run tests
1211 publish :
1312 runs-on : ubuntu-latest
14- # Require tests to pass before publish
15- if : ${{ github.event.workflow_run.conclusion == 'success' }}
13+ needs : [tests] # Require tests to pass before publish
1614 steps :
1715 - name : Checkout
1816 uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -2,20 +2,17 @@ name: Release
22permissions :
33 contents : write
44on :
5- workflow_run :
6- workflows : ["Run Tests"]
5+ push :
76 tags :
87 - ' *'
98 branches :
109 - main
11- types :
12- - completed
1310jobs :
11+ tests :
12+ uses : ./.github/workflows/tests.yml # Run tests
1413 build :
1514 runs-on : ubuntu-latest
16- # Require tests to pass before release
17- # https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
18- if : ${{ github.event.workflow_run.conclusion == 'success' }}
15+ needs : [tests] # Require tests to pass before release
1916 steps :
2017 - name : Checkout
2118 uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ permissions:
33 contents : write
44on :
55 push :
6+ branches :
7+ - ' !main'
68 workflow_call : # Allow this workflow to be called from other workflows
79jobs :
810 tests :
You can’t perform that action at this time.
0 commit comments