Skip to content

Commit 60a945f

Browse files
committed
release: action to publish npm
1 parent 400819c commit 60a945f

4 files changed

Lines changed: 986 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
issues: write
18+
pull-requests: write
19+
id-token: write
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v2
28+
29+
- name: Install dependencies
30+
run: bun install --frozen-lockfile
31+
32+
- name: Build
33+
run: bun run build
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: "lts/*"
39+
registry-url: "https://registry.npmjs.org"
40+
41+
- name: Release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: npx semantic-release

.releaserc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/npm",
7+
"@semantic-release/github"
8+
]
9+
}

0 commit comments

Comments
 (0)