-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.89 KB
/
terraform_provider_cd.yml
File metadata and controls
60 lines (58 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Terraform Provider release workflow.
name: CD
on:
workflow_call:
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release_please.outputs.release_created }}
steps:
- name: DevOpsArrBOT token
id: DevOpsArrBOT
uses: getsentry/action-github-app-token@v3
with:
app_id: '305652'
private_key: ${{ secrets.DEVOPSARRBOT_PRIVATE_KEY }}
- uses: actions/checkout@v5
with:
# Allow access to older tag information.
fetch-depth: 0
token: ${{ steps.DevOpsArrBOT.outputs.token }}
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Release Please
id: release_please
uses: google-github-actions/release-please-action@v4
with:
release-type: go
token: ${{ steps.DevOpsArrBOT.outputs.token }}
commit-search-depth: 1000
gorelease:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v5
with:
# Allow access to older tag information.
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
with:
# Terraform registry GPG key.
gpg_private_key: ${{ secrets.TERRAFORM_REGISTRY_GPG }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6.1.0
with:
args: release --clean
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}