11name : Ship js Manual Prepare
2- on :
3- issue_comment :
4- types : [created]
2+ on : workflow_dispatch
53jobs :
64 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')
115 runs-on : ubuntu-latest
126 steps :
137 - uses : actions/checkout@v2
@@ -16,49 +10,12 @@ jobs:
1610 ref : main
1711 - uses : actions/setup-node@v2
1812 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
2615 - run : |
2716 git config --global user.email "github-actions[bot]@users.noreply.github.com"
2817 git config --global user.name "github-actions[bot]"
29- - run : npm run release -- --yes --no-browse
18+ - run : yarn release --yes --no-browse
3019 env :
3120 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3221 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