diff --git a/.changelog/419.txt b/.changelog/419.txt new file mode 100644 index 000000000..3a4f2594d --- /dev/null +++ b/.changelog/419.txt @@ -0,0 +1,3 @@ +```release-note:improvement +Automatically update docs on auto release +``` diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 6654bf999..39ef838e6 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -82,6 +82,13 @@ jobs: rm -f OLD-CHANGELOG.md git add CHANGELOG.md git commit -m 'updated CHANGELOG.md' + echo "updating documentation" + CURRENT_VERSION_NUM="${CURRENT_VERSION:1}" + NEW_VERSION_NUM="${NEW_VERSION:1}" + sed -i "s/~> $CURRENT_VERSION_NUM/~> $NEW_VERSION_NUM/g" examples/provider/provider.tf + go generate + git add examples/provider/provider.tf docs/index.md + git commit -m 'updated documentation' echo "creating a new git tag" CHANGELOG_URL="https://github.com/hashicorp/terraform-provider-hcp/blob/${NEW_VERSION}/CHANGELOG.md" git tag -a -m "${NEW_VERSION}" -m "See changelog: ${CHANGELOG_URL}" "${NEW_VERSION}"