[DNM (before settings changes)] auto version bumping & suggested repo settings changes #368
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should not be merged before several changes are made to the repo's settings.
Changes
main
andrelease
branches.environment:
value to the Terraform Provider Release job. This makes the job a Github Deployment.Required settings changes
main
branch as protected (Settings -> Branches) (believe it already is).release
branch and protect it similarly - but also restrict admins' ability to evade protection w/ a force push.How this will change release & dev flows
In this design, every time you merge a PR with main, a new prerelease will be automatically built and deployed to the Terraform Registry (provided tests.yml passes). When you're ready to make a full release, open a PR main->release. Admins can still push their changes directly to main, but doing so should be done more judiciously.
Tag pushes can still be used to manually create a release from any branch (but deployment will fail if the branch is not protected). The auto version bump is skipped in these cases.
Some possible variations on this design
prerelease
branch instead of deployingmain
. This would allow folks to continue to commit to main - and permit manual releases from main w/ version tag - while still at least notionally locking down releases.release
branch, and never deploy prereleases or releases frommain
or any other branch (save when a protected branch is tagged).If any of these - or any other delta - seems better to y'all, let me know and I'll amend this patch accordingly.