mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
ci(release): don't patch MSR anymore, add npm semantic release plugin
This commit is contained in:
75
semantic-release-config.js
Normal file
75
semantic-release-config.js
Normal file
@@ -0,0 +1,75 @@
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @type {import('semantic-release').Options}
|
||||
*/
|
||||
const Options = {
|
||||
branches: [
|
||||
'main',
|
||||
{
|
||||
name: 'dev',
|
||||
prerelease: true,
|
||||
},
|
||||
],
|
||||
plugins:
|
||||
process.env['RELEASE_WORKFLOW_STEP'] !== 'publish'
|
||||
? [
|
||||
[
|
||||
'@semantic-release/commit-analyzer',
|
||||
{
|
||||
releaseRules: [{ type: 'build', scope: 'Needs bump', release: 'patch' }],
|
||||
},
|
||||
],
|
||||
'@semantic-release/release-notes-generator',
|
||||
'@semantic-release/changelog',
|
||||
[
|
||||
'@semantic-release/npm',
|
||||
{
|
||||
npmPublish: false,
|
||||
}
|
||||
],
|
||||
[
|
||||
'@semantic-release/git',
|
||||
{
|
||||
assets: ['CHANGELOG.md', 'package.json'],
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/github',
|
||||
{
|
||||
assets: [
|
||||
{
|
||||
path: 'dist/*',
|
||||
},
|
||||
],
|
||||
successComment: false,
|
||||
},
|
||||
],
|
||||
// This unfortunately has to run multiple times, even though it needs to run only once.
|
||||
[
|
||||
'@saithodev/semantic-release-backmerge',
|
||||
{
|
||||
backmergeBranches: [
|
||||
{
|
||||
from: 'main',
|
||||
to: 'dev',
|
||||
},
|
||||
],
|
||||
clearWorkspace: true,
|
||||
},
|
||||
],
|
||||
]
|
||||
: [],
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('semantic-release').Options} subprojectOptions
|
||||
* @returns {import('semantic-release').Options}
|
||||
*/
|
||||
export default function defineSubprojectReleaseConfig(subprojectOptions) {
|
||||
return {
|
||||
...Options,
|
||||
...subprojectOptions,
|
||||
plugins: [...(subprojectOptions.plugins || []), ...(Options.plugins || [])],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user