Skip to content

Commit fbd0632

Browse files
authored
chore: setup release workflow (#27)
1 parent 59dac1f commit fbd0632

3 files changed

Lines changed: 202 additions & 377 deletions

File tree

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
environment: npm
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: 24.14.0
28+
29+
- name: Setup Package Managers
30+
run: |
31+
npm install -g corepack@latest --force
32+
corepack enable
33+
34+
- name: Install Dependencies
35+
run: pnpm install
36+
37+
- name: Publish
38+
uses: JS-DevTools/npm-publish@v4
39+
with:
40+
token: empty
41+
42+
- name: Create GitHub Release
43+
uses: ncipollo/release-action@v1
44+
with:
45+
generateReleaseNotes: "true"

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@
2222
"scripts": {
2323
"build": "rslib --syntax es2023 && pnpm run build:types",
2424
"build:types": "tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write",
25-
"clean": "del-cli dist types",
26-
"fix": "pnpm run fix:prettier",
27-
"fix:prettier": "pnpm run lint:prettier -- --write",
2825
"lint": "npm-run-all -l -p \"lint:**\"",
2926
"lint:prettier": "prettier --cache --list-different .",
3027
"lint:spelling": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
3128
"lint:types": "tsc --pretty --noEmit",
3229
"prepare": "pnpm run build",
3330
"test": "rstest",
34-
"test:watch": "rstest -w"
31+
"test:watch": "rstest -w",
32+
"bump": "npx bumpp"
3533
},
3634
"devDependencies": {
3735
"@fastify/express": "^4.0.2",
@@ -48,7 +46,6 @@
4846
"connect": "^3.7.0",
4947
"cspell": "^9.6.2",
5048
"deepmerge": "^4.2.2",
51-
"del-cli": "^6.0.0",
5249
"execa": "^5.1.1",
5350
"express": "^5.1.0",
5451
"fastify": "^5.2.1",

0 commit comments

Comments
 (0)