Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERELEASEBRANCHES The release branches are invalid in the branches configuration. #114

Open
khawarizmus opened this issue Apr 24, 2022 · 1 comment

Comments

@khawarizmus
Copy link

As the title suggests i am getting this error when i run yarn multi-semantic-release --debug --dry-run the output is as follows:

multi-semantic-release version: 2.12.0
semantic-release version: 17.4.7
flags: {
  "debug": true,
  "dryRun": true,
  "sequentialInit": false,
  "firstParent": false,
  "deps": {
    "bump": "override",
    "release": "patch"
  },
  "ignorePrivatePackages": false
}
package paths [
  '/Users/Pocoyo/projects/bzness/bzness-back/apps/admin/package.json',
  '/Users/Pocoyo/projects/bzness/bzness-back/apps/api/package.json'
]
[01:04:05] › 🎉  Started multirelease! Loading 2 packages...
[01:04:05] › ✔  Loaded package admin
[01:04:05] › ✔  Loaded package api
[01:04:05] › 🎉  Queued 2 packages! Starting release...
  msr:inlinePlugin inlinePlugin created: admin +0ms
[01:04:05] [admin] › ℹ  Running semantic-release version 17.4.7
  msr:inlinePlugin inlinePlugin created: api +26ms
[01:04:05] [api] › ℹ  Running semantic-release version 17.4.7
[01:04:05] [admin] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[01:04:05] [admin] › ✔  Loaded plugin "success" from "@semantic-release/github"
[01:04:05] [admin] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[01:04:05] [api] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[01:04:05] [api] › ✔  Loaded plugin "success" from "@semantic-release/github"
[01:04:05] [api] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[01:04:14] [api] › ⚠  Skip step "fail" of plugin "@semantic-release/github" in dry-run mode
[01:04:14] [api] › ✖  ERELEASEBRANCHES The release branches are invalid in the `branches` configuration.
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 [].

[multi-semantic-release]: AggregateError: 
    SemanticReleaseError: The release branches are invalid in the `branches` configuration.
        at module.exports .....

I have set up a global .releaserc.json with the following configuration:

{
  "branches": ["master", "next"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/github",
    "@semantic-release/git",
    "@semantic-release/changelog"
  ]
}

then to be sure i added a local config in each packages containing the following configuration:

{
  "branches": ["master", "next"]
}

Any idea whay it's not detecting the branchs prorety in the config?

@luokuning
Copy link

This error is getting from semantic-release, it looks like you repositoryUrl or repository.url in package.json file is not a valid repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants