semantic-release: Can't publish maintenance release
Current behavior
Following the recipe here: https://github.com/semantic-release/semantic-release/blob/v16.0.0-beta.18%40beta/docs/recipes/maintenance-releases.md
- git checkout -b 1.x v1.17.0
- committed my changes
- pushed
- circleci ran job
Semantic release created a new dist-tag release-1.x and added all previous 1.* versions to it. Then when it got to the part where it needed to publish my new version 1.18.0 it gave me the following output:
[16:44:33] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 2 commits complete: minor release
[16:44:33] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[16:44:33] [semantic-release] › ℹ The next release version is 1.18.0
[16:44:33] [semantic-release] › ℹ Start step "fail" of plugin "@semantic-release/github"
octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)
[16:44:34] [semantic-release] [@semantic-release/github] › ℹ Found existing semantic-release issue #95.
[16:44:35] [semantic-release] [@semantic-release/github] › ℹ Added comment to issue #95: https://<enterprise github repo>/issues/95#issuecomment-592134.
[16:44:35] [semantic-release] › ✔ Completed step "fail" of plugin "@semantic-release/github"
[16:44:35] [semantic-release] › ✖ EINVALIDNEXTVERSION The release `1.18.0` on branch `1.x` cannot be published as it is out of range.
Based on the releases published on other branches, only versions within the range >=1.17.0 <1.17.0 can be published from branch 1.x.
The following commits are responsible for the invalid release:
* feat: force a npm publish (72a836c)
* fix(webpack): fixes the way babel transforms export * from X; (#93) (203c2a9)
Those commits should be moved to a valid branch with git merge (https://git-scm.com/docs/git-merge) or git cherry-pick (https://git-scm.com/docs/git-cherry-pick) and removed from branch 1.x with git revert (https://git-scm.com/docs/git-revert) or git reset (https://git-scm.com/docs/git-reset).
A valid branch could be master.
See the workflow configuration documentation (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/workflow-configuration.md) for more details.
Expected behavior
I expected it to publish 1.18.0 on dist-tag release-1.x. The following output seems to be erroneous as 1.18.0 IS >=1.17.0:
[16:44:35] [semantic-release] › ✖ EINVALIDNEXTVERSION The release `1.18.0` on branch `1.x` cannot be published as it is out of range.
Based on the releases published on other branches, only versions within the range >=1.17.0 <1.17.0 can be published from branch 1.x.
Environment
- “semantic-release”: “16.0.0-beta.17”,
- CI environment: circle ci
- Plugins used: “@semantic-release/commit-analyzer”: “^6.1.0”, “@semantic-release/exec”: “^3.3.2”, “@semantic-release/git”: “^7.0.7”, “@semantic-release/github”: “^5.2.8”, “@semantic-release/npm”: “^5.1.3”,
- semantic-release configuration:
{
"githubUrl": "<enterprise github>",
"githubApiPathPrefix": "/api/v3",
"publish": [
{
"path": "@semantic-release/npm"
},
{
"path": "@semantic-release/github"
}
],
"analyzeCommits": {
"preset": "angular",
"releaseRules": [
{
"type": "docs",
"scope": "README",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "style",
"release": "patch"
}
],
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES",
"BREAKING"
]
}
}
}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 40 (14 by maintainers)
Ok, sorry, I’ve just found out why I get that error message…
So if the
master
has the same, latest version like I have it in the maintenance branch (5.4.x
) it doesn’t allow me to release fix from/within this5.4.x
branch. I have to do it in themaster
branch. As soon as themaster
branch’s version will be bumped up and will be different (higher) from5.4.x
, It allows me to release fixes from the maintenance branch! Clever! But it should be documented somewhere… 😃It worked!!! 😁 Thanks a lot @pvdlg! I really appreciate the support.
🎉 This issue has been resolved in version 16.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
@nicholaskajoh the problem was due to the specific way that Circle CI clones the repo…It was really difficult to analyze as it seems Circle CI is the only CI cloning the repo the this way… It should be fixed in https://github.com/semantic-release/semantic-release/pull/1376
Hi @pvdlg! Here’s how I got to this issue:
git checkout -b 1.x v1.1.0
(no release).EINVALIDNEXTVERSION The release `1.1.1` on branch `1.x` cannot be published as it is out of range. Based on the releases published on other branches, only versions within the range >=1.1.0 <1.1.0 can be published from branch 1.x.
I can invite you to the test repo if you need more information. Cheers!
I still can reproduce. Can you invite me to your repo or make it public?
Seeing the same thing on latest
16.0.0-beta.24
.Has anyone ever successfully published a maintenance release using this?
🤷♂ it’s still not working. What would be the best way to report this?
@gr2m Thanks. I’m quite confused, I can’t get my setup to work but I’ll make a separate issue I think…