-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (48 loc) · 1.21 KB
/
release.yml
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
name: Release
on:
push:
tags:
- "v*"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "^1.17"
cache: true
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: "1.2.3"
terraform_wrapper: false
- name: Run acceptance and unit tests
env:
TF_ACC: true
NJALLA_TESTACC_DOMAIN: ${{ secrets.NJALLA_TESTACC_DOMAIN }}
NJALLA_API_TOKEN: ${{ secrets.NJALLA_API_TOKEN }}
run: go test -v ./...
release:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "^1.17"
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}