Put release commits on a new branch until published.
We used to write two commits to version control during release (one
with the release version, and one to start the new snapshot series).
These would get reverted if the used failed the release.
The problem was that when bugs were found it was tempting to make
(and possibly commit) changes to this modified version. These changes
then had to be rebased to the point before the release.
Now, the two commits are made on a new temporary branch. HEAD remains
at its original location during release testing, so commits are against
the right version and go to the right place. Failing a build now only requires
changing the temporary branch. Publishing moves HEAD to the tip of the new
branch.