Skip to content

Commit fbf5b50

Browse files
committed
chore: add release workflow
1 parent 772817e commit fbf5b50

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release & Publish
2+
on: workflow_dispatch
3+
jobs:
4+
release:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout source code
8+
uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
12+
- name: Install dependencies
13+
run: yarn install --frozen-lockfile
14+
15+
- name: Set Git user
16+
run: |
17+
git config --global user.email "[email protected]"
18+
git config --global user.name "GitHub Release Workflow"
19+
20+
- name: Create NPM config
21+
run: |
22+
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
23+
env:
24+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
25+
26+
- name: Run release
27+
run: npm run release --ci
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)