When publishing a package with mono publish, Mono will shell out to a language-specific package publishing command. If that command fails, then the local git repository will be left in an inconsistent state. There will be a commit in the current branch in your local repository describing the release that didn't happen, and a tag, named after the version that was never published, pointing to that commit.
To re-attempt the release, the following manual steps are necessary before running mono publish again:
git reset --hard HEAD^ to remove the "Publish package" commit
git tag -d <tag> to remove the tag pointing to that commit
If the "Publish package" commit is not manually removed, Mono will warn that there are no changes and abort the publishing process at the beginning. However, if the tag is not manually removed, Mono will go ahead with the release, resulting in a failure before reaching the language-specific publishing command, when attempting to create a tag that already exists.
There are many ways this could be addressed at different levels, theoretically at least:
When publishing a package with
mono publish, Mono will shell out to a language-specific package publishing command. If that command fails, then the local git repository will be left in an inconsistent state. There will be a commit in the current branch in your local repository describing the release that didn't happen, and a tag, named after the version that was never published, pointing to that commit.To re-attempt the release, the following manual steps are necessary before running
mono publishagain:git reset --hard HEAD^to remove the "Publish package" commitgit tag -d <tag>to remove the tag pointing to that commitIf the "Publish package" commit is not manually removed, Mono will warn that there are no changes and abort the publishing process at the beginning. However, if the tag is not manually removed, Mono will go ahead with the release, resulting in a failure before reaching the language-specific publishing command, when attempting to create a tag that already exists.
There are many ways this could be addressed at different levels, theoretically at least:
git tag -f)