This document describes the specifics required for maintaining our own GitHub provider until this PR has been merged: integrations#802 (by https://github.com/n0rad/terraform-provider-github)
# Update our own code
git checkout main
git pull origin main
git checkout -b updates
# Update integrations/terraform-provider-github
git remote add integrations https://github.com/integrations/terraform-provider-github
git merge -S integrations/main
# Update PR 802
git remote add n0rad https://github.com/n0rad/terraform-provider-github
git merge -S n0rad/master
When creating a new GitHub release, use the same release name (and git tag) as integrations/terraform-provider-github is using for its latest. We're simply enhancing it with n0rad's addition and want to follow their version scheme.
- Delete latest tag from
integrations/terraform-provider-github
(we're overwriting it)git tag -d v4.19.0 git push --delete origin v4.19.0
- Create git tag with
v[0-9]\.[0-9]\.[0-9]
(e.g.:v4.19.0
) - Create a GitHub Release with name:
v[0-9]\.[0-9]\.[0-9]
(e.g.:v4.19.0
) - Create
release/
directorymkdir release
- Build Linux artifacts:
mkdir .cache docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/.cache:/.cache -v $(pwd):/data -v $(pwd)/release:/go/bin -w /data golang make fmt docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/.cache:/.cache -v $(pwd):/data -v $(pwd)/release:/go/bin -w /data golang make build mv release/terraform-provider-github release/terraform-provider-github_4.19.0_linux_amd64
- Build MacOS artifacts (requires to be on a Mac):
make fmt make build cp /go/bin/terraform-provider-github release/terraform-provider-github_4.19.0_darwin_amd64
- Pack artifacts for release page
# Enter release/ directory cd release # Make executable chmod +x * # Zip files zip terraform-provider-github_4.19.0_linux_amd64.zip terraform-provider-github_4.19.0_linux_amd64 zip terraform-provider-github_4.19.0_darwin_amd64.zip terraform-provider-github_4.19.0_darwin_amd64 # Create SHA256SUMS file shasum -a 256 terraform-provider-github_4.19.0_linux_amd64.zip > terraform-provider-github_4.19.0_SHA256SUMS shasum -a 256 terraform-provider-github_4.19.0_darwin_amd64.zip >> terraform-provider-github_4.19.0_SHA256SUMS # Create binary signature of SHA256SUMS file # Use the same gpg identity as uploaded in Terraform Registry account (`EB10297E7BD3F3AD`) gpg \ --local-user EB10297E7BD3F3AD \ --output terraform-provider-github_4.19.0_SHA256SUMS.sig \ --detach-sign terraform-provider-github_4.19.0_SHA256SUMS
- Upload the following files into the GitHub release:
- terraform-provider-github_4.19.0_linux_amd64.zip
- terraform-provider-github_4.19.0_darwin_amd64.zip
- terraform-provider-github_4.19.0_SHA256SUMS
- terraform-provider-github_4.19.0_SHA256SUMS.sig
- Update provider at registry: https://registry.terraform.io/publish/provider/github/Flaconi/terraform-provider-github