1
1
name : Ship js Manual Prepare
2
- on :
3
- issue_comment :
4
- types : [created]
2
+ on : workflow_dispatch
5
3
jobs :
6
4
manual_prepare :
7
- if : |
8
- github.event_name == 'issue_comment' &&
9
- (github.event.comment.author_association == 'member' || github.event.comment.author_association == 'owner') &&
10
- startsWith(github.event.comment.body, '@shipjs prepare')
11
5
runs-on : ubuntu-latest
12
6
steps :
13
7
- uses : actions/checkout@v2
@@ -16,49 +10,12 @@ jobs:
16
10
ref : main
17
11
- uses : actions/setup-node@v2
18
12
with :
19
- node-version : ' 14'
20
- - run : |
21
- if [ -f "yarn.lock" ]; then
22
- yarn install
23
- else
24
- npm install
25
- fi
13
+ node-version : ' 16'
14
+ - run : yarn install --frozen-lockfile
26
15
- run : |
27
16
git config --global user.email "github-actions[bot]@users.noreply.github.com"
28
17
git config --global user.name "github-actions[bot]"
29
- - run : npm run release -- --yes --no-browse
18
+ - run : yarn release --yes --no-browse
30
19
env :
31
20
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
21
SLACK_INCOMING_HOOK : ${{ secrets.SLACK_INCOMING_HOOK }}
33
-
34
- create_done_comment :
35
- if : success()
36
- needs : manual_prepare
37
- runs-on : ubuntu-latest
38
- steps :
39
- - uses : actions/github-script@v3
40
- with :
41
- github-token : ${{ secrets.GITHUB_TOKEN }}
42
- script : |
43
- github.issues.createComment({
44
- issue_number: context.issue.number,
45
- owner: context.repo.owner,
46
- repo: context.repo.repo,
47
- body: "@${{github.actor}} `shipjs prepare` done"
48
- })
49
-
50
- create_fail_comment :
51
- if : cancelled() || failure()
52
- needs : manual_prepare
53
- runs-on : ubuntu-latest
54
- steps :
55
- - uses : actions/github-script@v3
56
- with :
57
- github-token : ${{ secrets.GITHUB_TOKEN }}
58
- script : |
59
- github.issues.createComment({
60
- issue_number: context.issue.number,
61
- owner: context.repo.owner,
62
- repo: context.repo.repo,
63
- body: "@${{github.actor}} `shipjs prepare` fail"
64
- })
0 commit comments