Skip to content

Commit b3c4203

Browse files
committed
Add release script
1 parent 18fd547 commit b3c4203

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# .github/workflows/release.yml
2+
3+
name: Release
4+
5+
on:
6+
pull_request:
7+
types: [closed]
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
jobs:
12+
release:
13+
if: >
14+
(github.head_ref == 'knope/release' && github.event.pull_request.merged == true)
15+
|| github.event_name == 'workflow_dispatch'
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
with:
22+
lfs: true
23+
24+
- name: Set up Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
registry-url: https://registry.npmjs.org/
29+
30+
- name: Install deps
31+
run: npm ci
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Publish to npm
37+
run: npm publish
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)