diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 00000000..e25092e7 --- /dev/null +++ b/.release-it.json @@ -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 + } +} diff --git a/package.json b/package.json index 307a31c5..5a94af38 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "devDependencies": { "@react-native/eslint-config": "^0.72.2", + "@release-it/conventional-changelog": "^7.0.2", "@types/jest": "^28.1.2", "@types/react": "~18.0.0", "@types/react-native": "0.72.3", @@ -28,6 +29,7 @@ "react": "18.2.0", "react-native": "0.72.5", "react-native-windows": "^0.61.0-0", + "release-it": "^16.2.1", "typescript": "5.1.6" }, "dependencies": {}, @@ -41,6 +43,7 @@ "prepare": "yarn build", "xbasic": "yarn --cwd examples/basic", "docs": "yarn --cwd docs build", + "release": "release-it", "test": "echo no test available" }, "files": [ @@ -54,6 +57,8 @@ "!android/buildOutput_*", "!android/local.properties", "!ios/build", - "!**/*.tsbuildinfo" + "!**/*.tsbuildinfo", + "!docs", + "!examples" ] }