Skip to content

Commit 6f9b855

Browse files
authored
chore(workflow): setup release CI (#6)
1 parent 54022a1 commit 6f9b855

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"lint": "biome check .",
2424
"lint:write": "biome check . --write",
2525
"prepare": "simple-git-hooks && npm run build",
26-
"test": "playwright test"
26+
"test": "playwright test",
27+
"bump": "npx bumpp"
2728
},
2829
"simple-git-hooks": {
2930
"pre-commit": "npx nano-staged"
@@ -62,6 +63,7 @@
6263
"packageManager": "[email protected]",
6364
"publishConfig": {
6465
"access": "public",
65-
"registry": "https://registry.npmjs.org/"
66+
"registry": "https://registry.npmjs.org/",
67+
"provenance": true
6668
}
6769
}

0 commit comments

Comments
 (0)