use different to master branch as release branch on semantic release
Asked Answered
C

2

5

When Im trying to use another release branch for trigger a release with semantic release. Semantic release is telling me

This test run was triggered on the branch jose, while semantic-release is configured to only publish from master, therefore a new version won’t be published.`

Is there any way to set up another release branch?

This is my release.config.js file

  release: {
    branches: ['jose']
  },
  dryRun: false,
  plugins: [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    "@semantic-release/github",
    ["@semantic-release/git", {
                "message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
    }],
    ["semantic-release-slack-bot", {
      "notifyOnSuccess": true,
      "notifyOnFail": true,
      "onSuccessTemplate": {
        "text": "A new version of $package_name with version $npm_package_version has been released at $repo_url!"
      }
    }]
  ]
}
Chanukah answered 26/6, 2020 at 16:31 Comment(0)
W
5

I had a similar problem, in my case the branch exists only locally not on the remote repo. Take a look at this github issue

Whine answered 23/9, 2020 at 7:30 Comment(1)
man i really wish the err msg in your terminal just said "did you forget to push to remote?" or something simpleMantissa
A
3

Try to run:

npx semantic-release --branches jose
Abuzz answered 28/6, 2020 at 13:45 Comment(1)
This should be --branches, not --branch.Vannavannatta

© 2022 - 2024 — McMap. All rights reserved.