Skip to content

Commit 349bfd6

Browse files
authored
release canary
1 parent 4e27e41 commit 349bfd6

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/release-comment.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 }}

0 commit comments

Comments
 (0)