Skip to content

Commit 872ee5b

Browse files
committed
feat: add GitHub Actions release workflow for Bun project
1 parent dc15529 commit 872ee5b

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: read
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: "24"
24+
registry-url: "https://registry.npmjs.org"
25+
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v1
28+
29+
- name: Install dependencies
30+
run: bun install
31+
32+
- name: Run tests
33+
run: bun test
34+
35+
- name: Release (Build & Prepare)
36+
run: bun run release
37+
38+
- name: Publish to NPM
39+
working-directory: .
40+
run: npm publish

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"scripts": {
2424
"prepare": "husky",
2525
"build": "tsdown",
26+
"release": "bun run build",
2627
"lint": "eslint . --ext .ts,.tsx,.js,.jsx",
2728
"lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
2829
"format": "prettier --write . --ignore-unknown",

0 commit comments

Comments
 (0)