feat: add release-it (#3342)

* feat: add release-it
* Update package.json

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
This commit is contained in:
Olivier Bouillet 2023-11-13 21:35:27 +01:00 committed by GitHub
parent 9054db35d7
commit da270891fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 1 deletions

27
.release-it.json Normal file
View File

@ -0,0 +1,27 @@
{
"git": {
"commitMessage": "chore: release v${version}",
"requireCleanWorkingDir": true,
"tagAnnotation": "Release v${version}",
"tagName": "v${version}"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md"
}
},
"hooks": {
"before:init": [
"rm -Rf lib",
"yarn install --frozen-lockfile --non-interactive --production=false",
"yarn run lint",
"yarn run build"
],
"after:release": "echo Successfully released ${name} v${version} from repository ${repo.repository}."
},
"npm": {
"skipChecks": false
}
}

View File

@ -17,6 +17,7 @@
}, },
"devDependencies": { "devDependencies": {
"@react-native/eslint-config": "^0.72.2", "@react-native/eslint-config": "^0.72.2",
"@release-it/conventional-changelog": "^7.0.2",
"@types/jest": "^28.1.2", "@types/jest": "^28.1.2",
"@types/react": "~18.0.0", "@types/react": "~18.0.0",
"@types/react-native": "0.72.3", "@types/react-native": "0.72.3",
@ -28,6 +29,7 @@
"react": "18.2.0", "react": "18.2.0",
"react-native": "0.72.5", "react-native": "0.72.5",
"react-native-windows": "^0.61.0-0", "react-native-windows": "^0.61.0-0",
"release-it": "^16.2.1",
"typescript": "5.1.6" "typescript": "5.1.6"
}, },
"dependencies": {}, "dependencies": {},
@ -41,6 +43,7 @@
"prepare": "yarn build", "prepare": "yarn build",
"xbasic": "yarn --cwd examples/basic", "xbasic": "yarn --cwd examples/basic",
"docs": "yarn --cwd docs build", "docs": "yarn --cwd docs build",
"release": "release-it",
"test": "echo no test available" "test": "echo no test available"
}, },
"files": [ "files": [
@ -54,6 +57,8 @@
"!android/buildOutput_*", "!android/buildOutput_*",
"!android/local.properties", "!android/local.properties",
"!ios/build", "!ios/build",
"!**/*.tsbuildinfo" "!**/*.tsbuildinfo",
"!docs",
"!examples"
] ]
} }