prerelease config causing errors
See original GitHub issueWith configuration
module.exports = {
branches: [{ name: 'master', prerelease: true }],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/github',
{
assets: [
{
path: 'dist.zip',
label: 'PWA App',
},
],
},
],
],
};
semantic-release “–dry-run” “–debug”
[6:31:02 PM] [semantic-release] › ℹ Running semantic-release version 17.1.1 [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “verifyConditions” from “@semantic-release/github” [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “analyzeCommits” from “@semantic-release/commit-analyzer” [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “generateNotes” from “@semantic-release/release-notes-generator” [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “publish” from “@semantic-release/github” [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “addChannel” from “@semantic-release/github” [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “success” from “@semantic-release/github” [6:31:02 PM] [semantic-release] › ✔ Loaded plugin “fail” from “@semantic-release/github” [6:31:10 PM] [semantic-release] › ⚠ Skip step “fail” of plugin “@semantic-release/github” in dry-run mode
A minimum of 1 and a maximum of 3 release branches are required in the branches configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches).
This may occur if your repository does not have a release branch, such as master.
Your configuration for the problematic branches is [].
{ AggregateError:
SemanticReleaseError: The release branches are invalid in the branches
configuration.
at module.exports (/Users/ridermansb/Projects/meve.ai/web/node_modules/semantic-release/lib/get-error.js:6:10)
at Object.entries.reduce (/Users/ridermansb/Projects/meve.ai/web/node_modules/semantic-release/lib/branches/index.js:44:19)
at Array.reduce (<anonymous>)
at module.exports (/Users/ridermansb/Projects/meve.ai/web/node_modules/semantic-release/lib/branches/index.js:34:46)
at module.exports (/Users/ridermansb/Projects/meve.ai/web/node_modules/semantic-release/lib/branches/index.js:66:11)
at process._tickCallback (internal/process/next_tick.js:68:7) name: ‘AggregateError’ }npm ERR! code ELIFECYCLE
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
this is only true if the commit uses type
feat
,fix
, orperf
(assuming you are using the default configuration). if there are no commits in the history of the branch that should result in a new version, no release will be published.please do not make statements like this without complete information. i’ve given some explanation around the reason behind this requirement in response to the issue you opened in https://github.com/semantic-release/semantic-release/issues/2345#issuecomment-1024352411. in the future, it would be appreciated if you gather agreement from the maintainers before deciding that existing checks provide no value and opening a PR to remove.
I would recommend closing this issue, I am using prerelease config just fine with the latest version and at at least one named branch that isn’t a prerelease branch. Here is my working config in
release.config.js
(maybe other file names are causing this issue though?):For anyone who is curious this code
'+([0-9])?(.{+([0-9]),x}).x',
is for maintenance branches like1.x
or2.1.x
, they do need to end in an x.