release-it stuff

This commit is contained in:
EthanShoeDev
2025-10-06 20:12:50 -04:00
parent 3f70c86bd4
commit c61f8ac01c
7 changed files with 123 additions and 13 deletions

View File

@@ -0,0 +1,42 @@
import type { Config } from 'release-it';
export default {
git: {
requireCleanWorkingDir: true,
tagName: '${npm.name}-v${version}',
tagAnnotation: '${npm.name} v${version}',
tagMatch: '${npm.name}-v*',
commitMessage: 'chore(${npm.name}): release v${version}',
push: true,
},
// This one *does* publish to npm
npm: {
publish: true,
// pass flags youd give to `npm publish`
publishArgs: ['--access', 'public'],
// (optional) skip npms own prepublish checks:
// skipChecks: true
},
github: {
release: true,
releaseName: '${npm.name} v${version}',
// optional: attach build artifacts
// assets: ['dist/**']
},
plugins: {
'@release-it/conventional-changelog': {
preset: 'conventionalcommits',
infile: 'CHANGELOG.md',
gitRawCommitsOpts: { path: 'packages/react-native-uniffi-russh' },
},
},
hooks: {
'before:init': ['pnpm run lint:check', 'pnpm run test'],
'before:npm:release': 'pnpm run build',
'after:release': 'echo "Published ${npm.name} v${version} to npm"',
},
} satisfies Config;

View File

@@ -79,6 +79,7 @@
"react-native": "0.81.4",
"react-native-builder-bob": "^0.40.13",
"release-it": "^19.0.4",
"release-it-pnpm": "^4.6.6",
"turbo": "^2.5.7",
"typescript": "~5.9.2"
},

View File

@@ -0,0 +1,42 @@
import { type Config } from 'release-it';
export default {
git: {
requireCleanWorkingDir: true,
tagName: '${npm.name}-v${version}',
tagAnnotation: '${npm.name} v${version}',
tagMatch: '${npm.name}-v*',
commitMessage: 'chore(${npm.name}): release v${version}',
push: true,
},
// This one *does* publish to npm
npm: {
publish: true,
// pass flags youd give to `npm publish`
publishArgs: ['--access', 'public'],
// (optional) skip npms own prepublish checks:
// skipChecks: true
},
github: {
release: true,
releaseName: '${npm.name} v${version}',
// optional: attach build artifacts
// assets: ['dist/**']
},
plugins: {
'@release-it/conventional-changelog': {
preset: 'conventionalcommits',
infile: 'CHANGELOG.md',
gitRawCommitsOpts: { path: 'packages/react-native-xtermjs-webview' },
},
},
hooks: {
'before:init': ['pnpm run lint:check', 'pnpm run test'],
'before:npm:release': 'pnpm run build',
'after:release': 'echo "Published ${npm.name} v${version} to npm"',
},
} satisfies Config;

View File

@@ -27,30 +27,32 @@
},
"devDependencies": {
"@epic-web/config": "^1.21.3",
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
"@eslint-react/eslint-plugin": "^1.53.0",
"@eslint/js": "^9.35.0",
"@types/react": "~19.1.12",
"@types/react-dom": "^19.1.7",
"@typescript-eslint/parser": "^8.44.0",
"@typescript-eslint/utils": "^8.43.0",
"@vitejs/plugin-react": "^5.0.2",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"js-base64": "^3.7.8",
"eslint": "^9.35.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
"eslint-plugin-react-hooks": "^5.2.0",
"@eslint-react/eslint-plugin": "^1.53.0",
"vite-plugin-singlefile": "^2.3.0",
"eslint-plugin-react-refresh": "^0.4.20",
"@typescript-eslint/parser": "^8.44.0",
"@typescript-eslint/utils": "^8.43.0",
"globals": "^16.4.0",
"js-base64": "^3.7.8",
"prettier": "^3.6.2",
"prettier-plugin-organize-imports": "^4.2.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-native-webview": "13.15.0",
"release-it": "^19.0.4",
"release-it-pnpm": "^4.6.6",
"typescript": "~5.9.2",
"typescript-eslint": "^8.44.0",
"vite": "6.3.6",
"vite-plugin-dts": "^4.5.4"
"vite-plugin-dts": "^4.5.4",
"vite-plugin-singlefile": "^2.3.0"
}
}

View File

@@ -21,5 +21,5 @@
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts", "vite.config.internal.ts"]
"include": ["vite.config.ts", "vite.config.internal.ts", ".release-it.ts"]
}