Skip to content

Commit ea7d382

Browse files
committed
changesets release action
1 parent 823e3be commit ea7d382

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js 20.x
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 20.x
22+
23+
- name: Install Dependencies
24+
run: npm install
25+
26+
- name: Creating .npmrc
27+
run: |
28+
cat << EOF > "$HOME/.npmrc"
29+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
30+
EOF
31+
env:
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
34+
- name: Create Release Pull Request or Publish to npm
35+
id: changesets
36+
uses: changesets/action@v1
37+
with:
38+
publish: npm run publish
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)