Chekuda
Chekuda

Reputation: 51

use different to master branch as release branch on semantic release

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!"
      }
    }]
  ]
}

Upvotes: 5

Views: 6310

Answers (2)

Mingbo Peng
Mingbo Peng

Reputation: 41

Try to run:

npx semantic-release --branches jose

Upvotes: 3

admir86
admir86

Reputation: 428

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

Upvotes: 5

Related Questions