-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.5 KB
/
release.yaml
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
name: "Release TF-Provider"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
permissions:
contents: write
jobs:
provider-release_pre-test:
name: "Test Provider code before the Release"
uses: ./.github/workflows/test.yaml
secrets: inherit
provider-release_build:
name: "Build Release of the Provider"
needs: provider-release_pre-test
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/community.yml@v3
secrets:
gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}'
with:
setup-go-version-file: 'go.mod'
provider-release_post-test:
name: "Test Provider artifact after the Release"
needs: provider-release_build
continue-on-error: true
runs-on: ubuntu-latest
steps:
- name: "Checkout Provider code from release tag"
uses: actions/checkout@v4
- name: "Install Terraform"
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
terraform_version: '1.5.7'
- name: "Test Provider with quickstart example"
run: |
set -eu -x;
TAG=${{ github.ref_name }};
VERSION=${TAG#v};
make test-examples-quickstart ARGS="-v ${VERSION} -f github-release-draft";
shell: bash
env:
STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}'
STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}'
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_NAME }}'
GH_TOKEN: '${{ github.token }}'