I have an NPM package I am trying to set up semantic release for so it will automatically deploy with a version bump.
I recently migrated from an old repo / npm package to a new one and since doing so semantic version wont create a new release for me and just says:
The local branch main is behind the remote one, therefore a new version won't be published.
I have created the v1.0.0
tag in the new repo and that matches the only published version of the package so far.
I have removed the changelog.md so it should start fresh.
My release config is like so:
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/github",
{
"assets": [
"CHANGELOG.md",
"dist/*",
"package.json"
]
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
It's a public package so you can see the CI for yourself: https://github.com/stretch0/use-feature/actions/runs/3862807130/jobs/6584602017
Repo is here if you'd like to see the rest of the code: https://github.com/stretch0/use-feature