Skip to content

Commit 2fceaa7

Browse files
committed
Added: release workflow
1 parent bf428da commit 2fceaa7

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- id: checkout
12+
name: Checkout
13+
uses: actions/checkout@v3
14+
- id: setup-bun
15+
name: Setup Bun
16+
uses: oven-sh/setup-bun@v1
17+
with:
18+
bun-version: latest
19+
- id: install-deps
20+
name: Install dependencies
21+
run: |
22+
bun install
23+
- id: update-package-version
24+
name: Update package version
25+
run: |
26+
sed -i "s/\"version\": \".*\"/\"version\": \"${GITHUB_REF_NAME#v}\"/" package.json
27+
- id: build
28+
name: Build
29+
run: |
30+
bun run build
31+
- uses: actions/setup-node@v3
32+
with:
33+
registry-url: "https://registry.npmjs.org"
34+
- run: npm publish
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)