Skip to content

Commit

Permalink
Merge pull request #147 from hashicorp/RDX-433/relapi-onboarding
Browse files Browse the repository at this point in the history
Onboard project to Releases API
  • Loading branch information
claire-labry authored May 10, 2022
2 parents 807006d + 5bcaff7 commit 67b4dfd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ 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 }}'
signore-client-secret: '${{ secrets.SIGNORE_CLIENT_SECRET }}'
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 }}'
9 changes: 4 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions .release/release-metadata.hcl
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 67b4dfd

Please sign in to comment.