Skip to content

Commit

Permalink
chore(ci): restore semantic-release plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
smellai committed Jul 4, 2024
1 parent 760eead commit 6a9d38b
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"lint": "eslint ./src/ --fix",
"prettier": "prettier --write src/",
"prepare": "husky",
"semantic-release": "node ./repo-scripts/release.ts",
"semantic-release": "node --loader ts-node/esm ./repo-scripts/release.ts",
"test:watch": "jest --watch",
"test": "jest --coverage",
"typecheck": "tsc --noEmit",
Expand Down
62 changes: 54 additions & 8 deletions repo-scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,60 @@ try {
// Plugin options
githubUrl: 'https://my-ghe.com',
githubApiPathPrefix: '/api-prefix', */
analyzeCommits: '@semantic-release/commit-analyzer',
verifyConditions: '@semantic-release/npm',
prepare: '@semantic-release/npm',
generateNotes: '@semantic-release/release-notes-generator',
publish: '@semantic-release/npm',
success: false,
fail: false,
npmPublish: true,
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
releaseRules: [
{
type: 'build',
scope: 'deps',
release: 'patch',
},
],
},
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits',
presetConfig: {
types: [
{
type: 'feat',
section: 'Features',
},
{
type: 'fix',
section: 'Bug Fixes',
},
{
type: 'build',
section: 'Dependencies and Other Build Updates',
hidden: false,
},
],
},
},
],
'@semantic-release/npm',
[
'@semantic-release/github',
{
successComment:
":tada: This ${issue.pull_request ? 'pull request' : 'issue'} is included in version ${nextRelease.version}",
},
],
[
'@semantic-release/git',
{
assets: ['package.json', 'package-lock.json'],
message:
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],
],
}
/* {
// Run semantic-release from `/path/to/git/repo/root` without having to change local process `cwd` with `process.chdir()`
Expand Down

0 comments on commit 6a9d38b

Please sign in to comment.