-
Notifications
You must be signed in to change notification settings - Fork 13
78 lines (64 loc) · 1.87 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Semantic Release
on:
push:
branches:
- master
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
- name: Restore Node cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Setup Go
uses: actions/setup-go@v2
- name: Restore Go cache
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
# Blank version number means latest version of Go.
key: ${{ runner.os }}-go-v-${{ hashFiles('**/go.sum') }}
- name: Import GPG key
id: import_gpg
uses: paultyng/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: 'v1.26.2'
install-only: true
- name: Install dependencies
run: npm ci
- name: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
run: npx semantic-release
- uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false
terraform_version: "${{ matrix.terraform }}"
- name: Sleep for 30 seconds
uses: jakejarvis/wait-action@master
with:
time: '30s'
- name: Confirm install from Registry
working-directory: ./example
run: terraform init