Skip to content

Commit 438e48b

Browse files
committed
chore(CI): setup release workflow
1 parent 69a5d5d commit 438e48b

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This action will publish the package to npm and create a GitHub release.
2+
name: Release
3+
4+
on:
5+
# Run `npm run bump` to bump the version and create a git tag.
6+
push:
7+
tags:
8+
- "v*"
9+
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Install Pnpm
24+
run: corepack enable
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
cache: "pnpm"
31+
32+
- name: Install Dependencies
33+
run: pnpm install
34+
35+
- name: Publish
36+
uses: JS-DevTools/npm-publish@v3
37+
with:
38+
token: ${{ secrets.RSBUILD_PLUGIN_NPM_TOKEN }}
39+
40+
- name: Create GitHub Release
41+
uses: ncipollo/release-action@v1
42+
with:
43+
generateReleaseNotes: "true"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"lint": "biome check .",
2222
"lint:write": "biome check . --write",
2323
"prepare": "simple-git-hooks && npm run build",
24-
"test": "playwright test"
24+
"test": "playwright test",
25+
"bump": "npx bumpp"
2526
},
2627
"simple-git-hooks": {
2728
"pre-commit": "npx nano-staged"

0 commit comments

Comments
 (0)