File tree Expand file tree Collapse file tree 5 files changed +71
-6
lines changed
Expand file tree Collapse file tree 5 files changed +71
-6
lines changed Original file line number Diff line number Diff line change 44 - master
55 types : [closed]
66
7- name : Add version tag
7+ name : Add release tag
88
99jobs :
1010 tag :
11- name : Add version tag
11+ name : Add release tag
1212 runs-on : ubuntu-latest
1313 if : github.event.pull_request.merged == true && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')
1414 steps :
3535 sha: context.sha
3636 })
3737 if : env.NEXT_VERSION
38+ - uses : actions/github-script@0.4.0
39+ with :
40+ github-token : ${{ secrets.ACCESS_TOKEN }}
41+ script : |
42+ github.git.createRef({
43+ owner: context.repo.owner,
44+ repo: context.repo.repo,
45+ ref: `refs/heads/release/next-${process.env.NEXT_VERSION}`,
46+ sha: context.sha
47+ })
48+ if : env.NEXT_VERSION
Original file line number Diff line number Diff line change 1+ on :
2+ schedule :
3+ - cron : 0 0 1 * *
4+ repository_dispatch :
5+ types : [check-link]
6+
7+ name : Broken Link Check
8+ jobs :
9+ check :
10+ name : Broken Link Check
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : technote-space/auto-cancel-redundant-job@v1
14+ with :
15+ EXCLUDE_MERGED : ' true'
16+ - name : Broken Link Check
17+ uses : technote-space/broken-link-checker-action@v1
Original file line number Diff line number Diff line change 99 env :
1010 LINT : 1
1111 steps :
12+ - uses : technote-space/auto-cancel-redundant-job@v1
13+ with :
14+ EXCLUDE_MERGED : ' true'
1215 - name : Set running flag
1316 run : echo "::set-env name=RUNNING::1"
1417 - uses : actions/checkout@v2
@@ -140,9 +143,22 @@ jobs:
140143 fi
141144 env :
142145 NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
143-
144146 - uses : actions/checkout@v2
145147 if : env.RUNNING
148+ - name : Set running flag
149+ run : npx can-npm-publish || echo "::set-env name=RUNNING::"
150+ if : env.RUNNING && matrix.target == 'npm'
151+ - name : Set running flag
152+ run : |
153+ LATEST=`npm view . version`
154+ CURRENT=`cat package.json | jq -r .version`
155+ if [ "$LATEST" = "$CURRENT" ]; then
156+ echo "::set-env name=RUNNING::"
157+ fi
158+ env :
159+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
160+ if : env.RUNNING && matrix.target == 'gpr'
161+
146162 - name : Setup Node.js
147163 uses : actions/setup-node@v1
148164 with :
Original file line number Diff line number Diff line change 1- on :
2- pull_request :
3- types : [opened, synchronize]
1+ on : pull_request
42
53name : Pull Request updated
64
7068 BRANCH_PREFIX : release/
7169 NEXT_VERSION : ${{ env.NEXT_VERSION }}
7270 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
Original file line number Diff line number Diff line change 1212 name : Update npm dependencies
1313 runs-on : ubuntu-latest
1414 steps :
15+ - uses : technote-space/auto-cancel-redundant-job@v1
16+ with :
17+ EXCLUDE_MERGED : ' true'
1518 - name : Update dependencies
1619 id : update_deps
1720 uses : technote-space/create-pr-action@v1
You can’t perform that action at this time.
0 commit comments