Skip to content

Commit d09582f

Browse files
chore: sync workflows
1 parent 877915f commit d09582f

File tree

8 files changed

+57
-68
lines changed

8 files changed

+57
-68
lines changed

.github/workflows/add-version-tag.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@ jobs:
1010
tag:
1111
name: Add version tag
1212
runs-on: ubuntu-latest
13-
if: github.event.pull_request.merged == true && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/')
13+
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:
1515
- name: Get version
1616
uses: technote-space/get-next-version-action@v1
1717
with:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
if: "! startsWith(github.event.pull_request.head.ref, 'release/v')"
18+
EXCLUDE_MESSAGES: |
19+
update package version
20+
update packages
21+
if: "! startsWith(github.head_ref, 'release/v')"
2022
- name: Get version
2123
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
2224
env:
23-
HEAD_REF: ${{ github.event.pull_request.head.ref }}
24-
if: startsWith(github.event.pull_request.head.ref, 'release/v')
25+
HEAD_REF: ${{ github.head_ref }}
26+
if: startsWith(github.head_ref, 'release/v')
2527
- uses: actions/github-script@0.4.0
2628
with:
2729
github-token: ${{ secrets.ACCESS_TOKEN }}

.github/workflows/ci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
- uses: technote-space/get-git-comment-action@v1
1616
- uses: technote-space/get-diff-action@v1
1717
with:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1918
PREFIX_FILTER: |
2019
src/
2120
__tests__/
@@ -64,7 +63,6 @@ jobs:
6463
- uses: technote-space/get-git-comment-action@v1
6564
- uses: technote-space/get-diff-action@v1
6665
with:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6866
PREFIX_FILTER: |
6967
src/
7068
__tests__/
@@ -172,7 +170,6 @@ jobs:
172170
- name: Check package version
173171
uses: technote-space/package-version-check-action@v1
174172
with:
175-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176173
COMMIT_DISABLED: 1
177174
if: env.RUNNING
178175
- name: Install Package dependencies
@@ -259,8 +256,6 @@ jobs:
259256
with:
260257
files: build/index.js
261258
draft: true
262-
env:
263-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
264259

265260
publishRelease:
266261
name: Create Release
@@ -295,8 +290,6 @@ jobs:
295290
if: always()
296291
steps:
297292
- uses: technote-space/workflow-conclusion-action@v1
298-
with:
299-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
300293
- uses: 8398a7/action-slack@v2
301294
with:
302295
status: failure

.github/workflows/issue-opened.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@ jobs:
99
name: Assign issues to project
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Assign issues to project
13-
uses: technote-space/create-project-card-action@v1
12+
- uses: technote-space/create-project-card-action@v1
1413
with:
1514
PROJECT: Backlog
1615
COLUMN: To do
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1816

1917
assignAuthor:
2018
name: Assign author to issue
2119
runs-on: ubuntu-latest
2220
steps:
23-
- name: Assign author to issue
24-
uses: technote-space/assign-author@v1
25-
with:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
- uses: technote-space/assign-author@v1

.github/workflows/pr-opened.yml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ jobs:
1010
name: Assign PullRequest to Project
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Assign PullRequest to Project
14-
uses: technote-space/create-project-card-action@v1
13+
- uses: technote-space/create-project-card-action@v1
1514
with:
1615
PROJECT: Backlog
1716
COLUMN: In progress
@@ -21,37 +20,10 @@ jobs:
2120
name: Assign author to PR
2221
runs-on: ubuntu-latest
2322
steps:
24-
- name: Assign Author to PR
25-
uses: technote-space/assign-author@v1
26-
with:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
- uses: technote-space/assign-author@v1
2824

2925
addLabelsByBranch:
3026
name: PR Labeler
3127
runs-on: ubuntu-latest
3228
steps:
33-
- name: PR Labeler
34-
uses: technote-space/pr-labeler-action@v3
35-
with:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
38-
checkVersion:
39-
name: Check package version
40-
runs-on: ubuntu-latest
41-
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/v')
42-
steps:
43-
- name: Set running flag
44-
run: echo "::set-env name=RUNNING::1"
45-
- uses: actions/checkout@v2
46-
- name: Set running flag
47-
run: |
48-
if [[ ! -f package.json ]] || [[ $(< package.json jq -r '.version == null') == 'true' ]]; then
49-
echo "::set-env name=RUNNING::"
50-
fi
51-
52-
- name: Check package version
53-
uses: technote-space/package-version-check-action@v1
54-
with:
55-
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
56-
BRANCH_PREFIX: release/
57-
if: env.RUNNING
29+
- uses: technote-space/pr-labeler-action@v3

.github/workflows/pr-updated.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ jobs:
88
triage:
99
name: Pull Request Labeler
1010
runs-on: ubuntu-latest
11-
if: "! startsWith(github.event.pull_request.head.ref, 'release/')"
11+
if: "! startsWith(github.head_ref, 'release/')"
1212
steps:
13-
- name: Pull Request Labeler
14-
uses: actions/labeler@v2
13+
- uses: actions/labeler@v2
1514
with:
1615
repo-token: ${{ secrets.GITHUB_TOKEN }}
1716

@@ -20,26 +19,23 @@ jobs:
2019
runs-on: ubuntu-latest
2120
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id
2221
steps:
23-
- name: Pull Request Body
24-
uses: technote-space/pr-commit-body-action@v1
22+
- uses: technote-space/pr-commit-body-action@v1
2523
with:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2724
EXCLUDE_MESSAGES: |
2825
trigger workflow
2926
update TOC
3027
update package version
3128
update wp version
3229
TITLE: '## Changes'
33-
LINK_ISSUE_KEYWORD: ${{ (startsWith(github.event.pull_request.head.ref, 'release/') && 'closes') || '' }}
30+
LINK_ISSUE_KEYWORD: ${{ (startsWith(github.head_ref, 'release/') && 'closes') || '' }}
3431
FILTER_PR: true
3532

3633
manageRelease:
3734
name: Manage release
3835
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')"
36+
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')"
4037
steps:
41-
- name: Manage release
42-
uses: technote-space/release-type-action@v1
38+
- uses: technote-space/release-type-action@v1
4339
with:
4440
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
4541
EXCLUDE_MESSAGES: |
@@ -49,7 +45,7 @@ jobs:
4945
checkVersion:
5046
name: Check package version
5147
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')"
48+
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')"
5349
steps:
5450
- name: Set running flag
5551
run: echo "::set-env name=RUNNING::1"
@@ -63,7 +59,9 @@ jobs:
6359
- name: Get version
6460
uses: technote-space/get-next-version-action@v1
6561
with:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
EXCLUDE_MESSAGES: |
63+
update package version
64+
update packages
6765
if: env.RUNNING
6866
- name: Check package version
6967
uses: technote-space/package-version-check-action@v1

.github/workflows/project-card-moved.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,4 @@ jobs:
99
name: Auto card labeler
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Auto card labeler
13-
uses: technote-space/auto-card-labeler@v1
14-
with:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
- uses: technote-space/auto-card-labeler@v1

.github/workflows/toc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ jobs:
1010
name: TOC Generator
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: TOC Generator
14-
uses: technote-space/toc-generator@v2
13+
- uses: technote-space/toc-generator@v2
1514
with:
1615
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
1716
TARGET_BRANCH_PREFIX: release/

.github/workflows/update-dependencies.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Update dependencies
16+
id: update_deps
1617
uses: technote-space/create-pr-action@v1
1718
with:
1819
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
@@ -29,3 +30,35 @@ jobs:
2930
PR_DEFAULT_BRANCH_TITLE: 'feat: release'
3031
TARGET_BRANCH_PREFIX: release/
3132
AUTO_MERGE_THRESHOLD_DAYS: 14
33+
34+
- name: Set running flag
35+
run: echo "::set-env name=RUNNING::"
36+
- name: Set running flag
37+
run: echo "::set-env name=RUNNING::1"
38+
if: steps.update_deps.outputs.result != 'succeeded' && github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')
39+
- uses: actions/checkout@v2
40+
if: env.RUNNING
41+
- name: Set running flag
42+
run: |
43+
if [[ ! -f package.json ]] || [[ $(< package.json jq -r '.version == null') == 'true' ]]; then
44+
echo "::set-env name=RUNNING::"
45+
fi
46+
- name: Get version
47+
uses: technote-space/get-next-version-action@v1
48+
with:
49+
EXCLUDE_MESSAGES: |
50+
update package version
51+
update packages
52+
if: "env.RUNNING && ! startsWith(github.head_ref, 'release/v')"
53+
- name: Get version
54+
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
55+
env:
56+
HEAD_REF: ${{ github.head_ref }}
57+
if: env.RUNNING && startsWith(github.head_ref, 'release/v')
58+
- name: Check package version
59+
uses: technote-space/package-version-check-action@v1
60+
with:
61+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
62+
BRANCH_PREFIX: release/
63+
NEXT_VERSION: ${{ env.NEXT_VERSION }}
64+
if: env.NEXT_VERSION

0 commit comments

Comments
 (0)