-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.76 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
55
56
57
58
59
60
61
62
63
64
65
66
67
# Terraform Provider release workflow.
name: Release
# This GitHub action creates a release when manually run with signer details
on:
workflow_dispatch:
inputs:
CS_ID:
description: "Code Signing ID"
required: true
type: string
CS_API_TOKEN:
description: "Code Signing API Token"
required: true
type: string
# Releases need permissions to read and write the repository contents.
# GitHub considers creating releases and uploading assets as writing contents.
permissions:
contents: write
jobs:
acceptance-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Just
uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Inject Env File
run: echo "${{ secrets.ACCEPTANCE_ENV_FILE }}" > acceptance.env
- name: Run Acceptance Tests
run: just acceptance-tests acceptance.env
goreleaser:
runs-on: Signer
needs: acceptance-tests
steps:
- uses: actions/[email protected]
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- name: Setup Just
uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/[email protected]
with:
go-version-file: 'go.mod'
cache: true
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
args: release --clean
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CS_ID: ${{ inputs.CS_ID }}
CS_API_TOKEN: ${{ inputs.CS_API_TOKEN }}