The CI script tried deleting the git tag before creating it. This is useful for stable-* tags but caused a problem when releasing a new version since the new version tag will not exist.
3. CI should not try deploying on master branch if the version number is already deployed before
Right now, CI is trying and failing to deploy if the current version on master is a REVISION and the version number is not updated. We should just simply skip the deployment instead of causing trouble. This will also allow us to merge some commits to the master branch without releasing a version (like this PR, we do not want to release a version for CI changes).
This PR addresses several issues:
1. Do not fail deployment if tag does not exists
The CI script tried deleting the git tag before creating it. This is useful for
stable-*
tags but caused a problem when releasing a new version since the new version tag will not exist.2. Replace pre-releases
Every pre-release commit to master branch created a new pre-release version on GitHub. Instead, we can replace the existing one, until the actual release. The ghr command we use in the deployment script has an option called
-recreate
to enable this and I've added it here: https://github.com/polyfy/polylith/blob/9402e53e1797aa2c6450a1ee677d8a0b725e1daa/.circleci/config.yml#L2433. CI should not try deploying on master branch if the version number is already deployed before
Right now, CI is trying and failing to deploy if the current version on master is a REVISION and the version number is not updated. We should just simply skip the deployment instead of causing trouble. This will also allow us to merge some commits to the master branch without releasing a version (like this PR, we do not want to release a version for CI changes).