Skip to content

Commit 3e8f443

Browse files
committed
chore: automate releases using release-it
1 parent 1f94b1e commit 3e8f443

File tree

2 files changed

+1412
-238
lines changed

2 files changed

+1412
-238
lines changed

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"lint": "tsc --noEmit && eslint src --ext .ts,.tsx",
30+
"release": "release-it",
3031
"test": "jest"
3132
},
3233
"dependencies": {
@@ -37,6 +38,7 @@
3738
"@babel/preset-typescript": "^7.8.3",
3839
"@commitlint/cli": "^8.3.5",
3940
"@commitlint/config-conventional": "^8.3.4",
41+
"@release-it/conventional-changelog": "^1.1.0",
4042
"@types/jest": "^25.1.2",
4143
"@types/react": "^16.9.19",
4244
"@types/react-native": "^0.61.12",
@@ -55,6 +57,8 @@
5557
"react": "16.9.0",
5658
"react-native": "^0.61.5",
5759
"react-test-renderer": "^16.12.0",
60+
"release-it": "^12.4.3",
61+
"rimraf": "^3.0.1",
5862
"typescript": "^3.7.5"
5963
},
6064
"peerDependencies": {
@@ -74,5 +78,26 @@
7478
"jest-junit": {
7579
"outputDirectory": "./artifacts/jest",
7680
"outputName": "results.xml"
81+
},
82+
"release-it": {
83+
"git": {
84+
"commitMessage": "chore: release %s",
85+
"tagName": "v%s"
86+
},
87+
"npm": {
88+
"publish": true
89+
},
90+
"github": {
91+
"release": true,
92+
"releaseName": "${version}"
93+
},
94+
"hooks": {
95+
"after:bump": "rimraf dist && yarn build"
96+
},
97+
"plugins": {
98+
"@release-it/conventional-changelog": {
99+
"preset": "conventionalcommits"
100+
}
101+
}
77102
}
78103
}

0 commit comments

Comments
 (0)