Skip to content

Commit

Permalink
Necessary bits to onboard project to the Releases API
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-labry authored and anGie44 committed May 9, 2022
1 parent a7f0bd5 commit 448edc3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,16 @@ jobs:
needs: [go-version, release-notes]
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@v1
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-key-prod: '${{ secrets.HC_RELEASES_KEY_PROD }}'
hc-releases-key-staging: '${{ secrets.HC_RELEASES_KEY_STAGING }}'
hc-releases-github-token: '${{ secrets.HASHI_RELEASES_GITHUB_TOKEN }}'
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 }}'
hc-releases-host-staging: '${{ secrets.HC_RELEASES_HOST_STAGING }}'
hc-releases-host-prod: '${{ secrets.HC_RELEASES_HOST_PROD }}'
with:
goreleaser-release-args: --timeout 2h
hc-releases-aws-role-duration-seconds: 7200
release-notes: true
setup-go-version: '${{ needs.go-version.outputs.version }}'
highest-version-tag:
Expand Down
11 changes: 6 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ 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 -upload-name={{ .ArtifactName }}
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 }}
dir: "{{ dir .ArtifactPath }}"
cmd: |
hc-releases upload -file={{ .ArtifactName }} -product={{ .ProjectName }} -version={{ .Version }} -header=x-terraform-protocol-version=5 -header=x-terraform-protocol-versions=5.0
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-aws"
url_license = "https://github.com/hashicorp/terraform-provider-aws/blob/main/LICENSE"

0 comments on commit 448edc3

Please sign in to comment.