chore(main): release 0.7.0-alpha (#266) #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform Provider Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: 'TF Provider Release version to publish. Requires an pre-existing repo release and the provided value must be formatted as a semver.' | |
required: true | |
default: 'v0.0.0-alpha' | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
pre-release-checks: | |
name: '🚦 Pre-release Validation' | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Check out code | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.release_version || github.ref }} | |
- name: Set up Go | |
uses: actions/setup-go@v5.2.0 | |
with: | |
cache: true | |
go-version-file: 'go.mod' | |
id: go | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v3.1.2 | |
with: | |
terraform_version: '1.10.2' | |
terraform_wrapper: false | |
- name: Run 'go mod tidy' and check for differences | |
run: | | |
go mod tidy | |
git diff --exit-code -- go.mod go.sum || \ | |
(echo; echo "Unexpected difference in go.mod/go.sum files. Run 'go mod tidy' command or revert any go.mod/go.sum changes and commit."; exit 1) | |
- name: Get go mod dependencies | |
run: | | |
go mod download | |
- name: Go build | |
run: | | |
go build -v . | |
# Release for Partner and Community Providers | |
# https://goreleaser.com/cmd/goreleaser_release/#see-also | |
terraform-provider-release: | |
name: '📦 Terraform Provider Release' | |
needs: [pre-release-checks] | |
uses: ./.github/workflows/tf-registry-goreleaser.yml | |
secrets: | |
gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}' # Your GPG private key | |
gpg-private-key-passphrase: '${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}' # Passphrase for your GPG key, if applicable | |
with: | |
goreleaser-release-args: --verbose --parallelism 4 --timeout 120m0s # required due to provider release file size | |
release-notes: false | |
setup-go-version: '1.22.5' | |
git-ref: ${{ github.event.inputs.release_version || github.ref }} | |
release-notes: | |
runs-on: ubuntu-latest | |
needs: [terraform-provider-release] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@v2.10.2 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Generate Release Notes | |
run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt | |
- uses: actions/upload-artifact@v4.5.0 | |
with: | |
name: release-notes | |
path: release-notes.txt | |
retention-days: 1 |