1- on :
2- pull_request :
3- types : [opened, synchronize]
1+ on : pull_request
42
53name : Pull Request updated
64
75jobs :
86 triage :
97 name : Pull Request Labeler
108 runs-on : ubuntu-latest
11- if : " ! startsWith(github.event.pull_request.head.ref , 'release/')"
9+ if : " ! startsWith(github.head_ref , 'release/')"
1210 steps :
13- - name : Pull Request Labeler
14- uses : actions/labeler@v2
11+ - uses : actions/labeler@v2
1512 with :
1613 repo-token : ${{ secrets.GITHUB_TOKEN }}
1714
@@ -20,26 +17,23 @@ jobs:
2017 runs-on : ubuntu-latest
2118 if : github.event.pull_request.head.user.id == github.event.pull_request.base.user.id
2219 steps :
23- - name : Pull Request Body
24- uses : technote-space/pr-commit-body-action@v1
20+ - uses : technote-space/pr-commit-body-action@v1
2521 with :
26- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2722 EXCLUDE_MESSAGES : |
2823 trigger workflow
2924 update TOC
3025 update package version
3126 update wp version
3227 TITLE : ' ## Changes'
33- LINK_ISSUE_KEYWORD : ${{ (startsWith(github.event.pull_request.head.ref , 'release/') && 'closes') || '' }}
28+ LINK_ISSUE_KEYWORD : ${{ (startsWith(github.head_ref , 'release/') && 'closes') || '' }}
3429 FILTER_PR : true
3530
3631 manageRelease :
3732 name : Manage release
3833 runs-on : ubuntu-latest
39- if : " github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref , 'release/') && ! startsWith(github.event.pull_request.head.ref , 'release/v')"
34+ if : " github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref , 'release/') && ! startsWith(github.head_ref , 'release/v')"
4035 steps :
41- - name : Manage release
42- uses : technote-space/release-type-action@v1
36+ - uses : technote-space/release-type-action@v1
4337 with :
4438 GITHUB_TOKEN : ${{ secrets.ACCESS_TOKEN }}
4539 EXCLUDE_MESSAGES : |
4943 checkVersion :
5044 name : Check package version
5145 runs-on : ubuntu-latest
52- if : " github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref , 'release/') && ! startsWith(github.event.pull_request.head.ref , 'release/v')"
46+ if : " github.event.action == 'synchronize' && github.event. pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref , 'release/') && ! startsWith(github.head_ref , 'release/v')"
5347 steps :
5448 - name : Set running flag
5549 run : echo "::set-env name=RUNNING::1"
6357 - name : Get version
6458 uses : technote-space/get-next-version-action@v1
6559 with :
66- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ EXCLUDE_MESSAGES : |
61+ update package version
62+ update packages
6763 if : env.RUNNING
6864 - name : Check package version
6965 uses : technote-space/package-version-check-action@v1
7268 BRANCH_PREFIX : release/
7369 NEXT_VERSION : ${{ env.NEXT_VERSION }}
7470 if : env.NEXT_VERSION
71+
72+ checkPublish :
73+ name : Check publish
74+ runs-on : ubuntu-latest
75+ if : " github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')"
76+ steps :
77+ - name : Set running flag
78+ run : echo "::set-env name=RUNNING::1"
79+ - name : Set running flag
80+ run : |
81+ if [ -z "$NPM_AUTH_TOKEN" ]; then
82+ echo "::set-env name=RUNNING::"
83+ fi
84+ env :
85+ NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
86+
87+ - uses : actions/checkout@v2
88+ if : env.RUNNING
89+ - uses : technote-space/can-npm-publish-action@v1
90+ if : env.RUNNING
0 commit comments