However, I’m trying to think through the deployment stage of my code. At current, deployment stage is set to start on the ‘master’ branch, but realize that the deploy script will run each time the PR is updated with new commits.
The deploy script consists of deploying the binaries to Github as a draft release. But it’s annoying to have to delete draft after draft.
I’ve thought about doing the deployment after I tag the commit, which I could do after code review. Ideally, I’d like to push deployments after PRs are approved, and after merge.
What is the best way to accomplish this?
Quick edit: I’m also experiencing the “double builds” issue, which I think is related to the above question. Restricting the PR request build would prevent the PR from showing the status of the build on the PR, though you could see this in the list of commits but seems like a work around. If there is a best practice around this, that would also be appreciated.
Creating a tag may trigger another build, for the newly-created tag. If it does, your logic needs to somehow recognize this situation (to e.g. avoid infinitely creating new releases).