File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ permissions :
4
+ contents : write
5
+
6
+ on :
7
+ issue_comment :
8
+ types :
9
+ - created
10
+
11
+ jobs :
12
+ release :
13
+ if : ${{ github.event.issue.pull_request && github.event.comment.body == '/release' }}
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ with :
18
+ fetch-depth : 0
19
+
20
+ - name : Install pnpm
21
+ uses : pnpm/action-setup@v3
22
+ with :
23
+ version : 8
24
+
25
+ - name : Install Node.js
26
+ uses : actions/setup-node@v4
27
+ with :
28
+ node-version : 20
29
+ cache : " pnpm"
30
+ registry-url : " https://registry.npmjs.org"
31
+
32
+ - name : Install dependencies
33
+ run : pnpm install
34
+
35
+ - name : Setup git
36
+ run : git config --global user.email "support+actions@github.com" && git config --global user.name "github-actions-bot"
37
+
38
+ - name : npm version
39
+ run : npm version prerelease --preid=canary
40
+ env :
41
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
42
+
43
+ - name : Modify name of the package.json
44
+ uses : maxgfr/github-change-json@main
45
+ with :
46
+ key : " name"
47
+ value : " @${{ github.repository_owner }}/${{ github.repository_name }}"
48
+ path : package.json
49
+ commit : false # it will not commit the change
50
+
51
+ - run : pnpm publish --no-git-checks
52
+ env :
53
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments