Skip to content

Commit d92e5c0

Browse files
authored
chore: improve release process (#65)
Improve DX by: - Configuring defaults for uniformity - Prompting only for the version input - Using TS file for configuration to provide hints
1 parent 7467bcf commit d92e5c0

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

.release-it.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { Config } from 'release-it';
2+
3+
export default {
4+
git: {
5+
commit: true,
6+
commitMessage: 'chore: release ${version}',
7+
tag: true,
8+
push: true,
9+
},
10+
github: {
11+
release: true,
12+
},
13+
npm: {
14+
publish: true,
15+
},
16+
hooks: {
17+
'after:bump': 'npm run build',
18+
},
19+
} satisfies Config;

package.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"clean": "rm -rf dist",
2929
"build": "npm run clean && tsc -b src",
3030
"format": "prettier -w .",
31-
"release": "npm run build && release-it",
31+
"release": "release-it --only-version",
3232
"test": "TS_NODE_PROJECT=tests node --test --test-concurrency=none -r ts-node/register tests/**[!build]/index.test.ts",
3333
"test:build": "npm run build && tstyche build",
3434
"prepare": "husky"
@@ -71,13 +71,5 @@
7171
},
7272
"publishConfig": {
7373
"access": "public"
74-
},
75-
"release-it": {
76-
"git": {
77-
"commitMessage": "chore: release ${version}"
78-
},
79-
"github": {
80-
"release": true
81-
}
8274
}
8375
}

0 commit comments

Comments
 (0)