Skip to content

Commit cfa1d6f

Browse files
committed
ci: add automated release workflow for v* tags
Made-with: Cursor
1 parent fda9e5f commit cfa1d6f

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
11
name: Release
2+
23
on:
34
push:
4-
tags: ['v*']
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
510

611
jobs:
7-
test:
12+
release:
813
runs-on: ubuntu-latest
914
steps:
1015
- uses: actions/checkout@v4
16+
1117
- uses: oven-sh/setup-bun@v2
18+
1219
- run: bun install
13-
- run: bun run typecheck
14-
- run: bun test
20+
21+
- run: bun run build
22+
23+
- name: Create GitHub Release
24+
uses: softprops/action-gh-release@v2
25+
with:
26+
generate_release_notes: true
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: '20'
33+
registry-url: 'https://registry.npmjs.org'
34+
35+
- name: Publish to npm
36+
run: npm publish
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)