Automate versioning of Terraform in a GitHub repo with the use of GitHub Actions and Semantic Release. GitHub Actions will automate the process of running Semantic Release on commits to a chosen branch, and Semantic release will create a Git Tag, and a GitHub Release with release notes about changes in the added commits.
This action will checkout your repo, setup node, install semantic release (this could be cached using NPM cache, to speed up future runs), run sematic-release with a GitHub token, so that the action has permissions to create a release and tag for the repo.
Code included in this post can be found here: