Skip to content

Commit d139869

Browse files
author
Slavek Kabrda
authored
Add releasing Github workflow (#592)
1 parent c0308bb commit d139869

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copied from https://github.com/hashicorp/terraform-provider-scaffolding/blob/master/.github/workflows/release.yml
2+
name: release
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
jobs:
8+
goreleaser:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Unshallow
14+
run: git fetch --prune --unshallow
15+
- name: Set up Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: 1.14
19+
- name: Import GPG key
20+
id: import_gpg
21+
uses: paultyng/[email protected]
22+
env:
23+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
24+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v2
27+
with:
28+
version: latest
29+
args: release --rm-dist
30+
env:
31+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)