Skip to content

Commit 5b8b9c7

Browse files
author
ugogo
committed
add release-it for release management
1 parent 03caa24 commit 5b8b9c7

File tree

4 files changed

+1122
-77
lines changed

4 files changed

+1122
-77
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GITHUB_TOKEN=""

.release-it.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"git": {
3+
"commitMessage": "release v${version}"
4+
},
5+
"github": {
6+
"release": true
7+
}
8+
}

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"node": ">=10"
1313
},
1414
"publishConfig": {
15-
"registry": "https://npm.pkg.github.com/"
15+
"registry": "https://npm.pkg.github.com/",
16+
"access": "public"
1617
},
1718
"scripts": {
1819
"build": "microbundle-crl --no-compress --format modern,cjs --css-modules false",
@@ -24,7 +25,8 @@
2425
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
2526
"test:watch": "react-scripts test --env=jsdom",
2627
"predeploy": "cd example && yarn install && yarn run build",
27-
"deploy": "gh-pages -d example/build"
28+
"deploy": "gh-pages -d example/build",
29+
"release": "npm run test && npm run prepare && dotenv release-it"
2830
},
2931
"peerDependencies": {
3032
"react": "^16.0.0"
@@ -39,9 +41,9 @@
3941
"@types/react-dom": "^16.9.7",
4042
"@typescript-eslint/eslint-plugin": "^2.26.0",
4143
"@typescript-eslint/parser": "^2.26.0",
42-
"microbundle-crl": "^0.13.10",
4344
"babel-eslint": "^10.0.3",
4445
"cross-env": "^7.0.2",
46+
"dotenv-cli": "^3.1.0",
4547
"eslint": "^6.8.0",
4648
"eslint-config-prettier": "^6.7.0",
4749
"eslint-config-standard": "^14.1.0",
@@ -53,11 +55,13 @@
5355
"eslint-plugin-react": "^7.17.0",
5456
"eslint-plugin-standard": "^4.0.1",
5557
"gh-pages": "^2.2.0",
58+
"microbundle-crl": "^0.13.10",
5659
"npm-run-all": "^4.1.5",
5760
"prettier": "^2.0.4",
5861
"react": "^16.13.1",
5962
"react-dom": "^16.13.1",
6063
"react-scripts": "^3.4.1",
64+
"release-it": "^13.6.3",
6165
"typescript": "^3.7.5"
6266
},
6367
"files": [

0 commit comments

Comments
 (0)