diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b75233a4..8ef17335 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,13 +33,13 @@ jobs: terraform-provider-release: name: 'Terraform Provider Release' needs: [go-version, release-notes] - uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@v1 + uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@v2 secrets: - hc-releases-aws-access-key-id: '${{ secrets.TF_PROVIDER_RELEASE_AWS_ACCESS_KEY_ID }}' - hc-releases-aws-secret-access-key: '${{ secrets.TF_PROVIDER_RELEASE_AWS_SECRET_ACCESS_KEY }}' - hc-releases-aws-role-arn: '${{ secrets.TF_PROVIDER_RELEASE_AWS_ROLE_ARN }}' - hc-releases-fastly-api-token: '${{ secrets.HASHI_FASTLY_PURGE_TOKEN }}' hc-releases-github-token: '${{ secrets.HASHI_RELEASES_GITHUB_TOKEN }}' + hc-releases-host-staging: '${{ secrets.HC_RELEASES_HOST_STAGING }}' + hc-releases-host-prod: '${{ secrets.HC_RELEASES_HOST_PROD }}' + hc-releases-key-prod: '${{ secrets.HC_RELEASES_KEY_PROD }}' + hc-releases-key-staging: '${{ secrets.HC_RELEASES_KEY_STAGING }}' hc-releases-terraform-registry-sync-token: '${{ secrets.TF_PROVIDER_RELEASE_TERRAFORM_REGISTRY_SYNC_TOKEN }}' setup-signore-github-token: '${{ secrets.HASHI_SIGNORE_GITHUB_TOKEN }}' signore-client-id: '${{ secrets.SIGNORE_CLIENT_ID }}' @@ -47,3 +47,5 @@ jobs: with: release-notes: true setup-go-version: '${{ needs.go-version.outputs.version }}' + # Product Version (e.g. v1.2.3 or github.ref_name) + product-version: '${{ github.ref_name }}' diff --git a/.goreleaser.yml b/.goreleaser.yml index 8de7d926..3e1157c7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -45,15 +45,14 @@ publishers: # Terraform CLI 0.10 - 0.11 perform discovery via HTTP headers on releases.hashicorp.com # For providers which have existed since those CLI versions, exclude # discovery by setting the protocol version headers to 5. - cmd: hc-releases upload-file {{ abs .ArtifactPath }} -header=x-terraform-protocol-version=5 -header=x-terraform-protocol-versions=5.0 + cmd: hc-releases upload -product {{ .ProjectName }} -version {{ .Version }} -file={{ .ArtifactPath }}={{ .ArtifactName }} -header=x-terraform-protocol-version=5 -header=x-terraform-protocol-versions=5.0 env: - - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }} - - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }} - - AWS_SESSION_TOKEN={{ .Env.AWS_SESSION_TOKEN }} + - HC_RELEASES_HOST={{ .Env.HC_RELEASES_HOST }} + - HC_RELEASES_KEY={{ .Env.HC_RELEASES_KEY }} extra_files: - glob: 'terraform-registry-manifest.json' name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json' - name: hc-releases + name: upload signature: true release: extra_files: diff --git a/.release/release-metadata.hcl b/.release/release-metadata.hcl new file mode 100644 index 00000000..ea8d02ea --- /dev/null +++ b/.release/release-metadata.hcl @@ -0,0 +1,2 @@ +url_source_repository = "https://github.com/hashicorp/terraform-provider-ad" +url_license = "https://github.com/hashicorp/terraform-provider-ad/blob/main/LICENSE"