Before anything, let me explain my current setup:
- I have 2 branches on my github repo: "main" and "develop"
- main is the production one
- develop is the dev&test environment
- develop will always be ahead of main in terms of versioning. While in main I'll have v0.7.0, on develop I will have v0.7.1
Expected behaviour:
- after pushing from develop to main, main should update to develop version (v0.7.1)
- I alreay created 2 tags and releases (v0.7.0-beta for main branch, v0.7.0-betaDev for develop branch)
Currently when using npm semantic release on github actions (where my CICD is), it always says that there is no release version and it creates a v1.0.0 version.
Here is my package.json config for npm semantic release:
"release": {
"branches": [{"name": "main"},{"name": "develop", "prerelease": true}],
"npmPublish": false,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
["@semantic-release/github", {
"successComment": false,
"failComment": false,
"releasedLabels": false
}],
[
"@semantic-release/git",
{
"assets": [],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}