-
Notifications
You must be signed in to change notification settings - Fork 106
56 lines (47 loc) · 1.53 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
name: release
on:
push:
tags:
- "v*"
jobs:
create-release:
name: Create Release
runs-on: "ubuntu-latest"
steps:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: '^1.16'
# Install external go modules before cloning
- run: go install github.com/laher/goxc@latest
# Checkout code
- uses: actions/checkout@v2
# Install golang deps, using a cache
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ubuntu-latest-1.16-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
ubuntu-latest-1.16-go-
# build binaries for all supported environments
- run: sudo apt update && sudo apt install -y make
- run: make build-all
# Create the binary checksums
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- uses: tristan-weil/ghaction-checksum-sign-artifact@v1
id: checksums
with:
path: 'build/${{ steps.get_version.outputs.VERSION }}/*'
checksum_digests: sha256,sha512
checksum_format: gnu
checksum_output: one_file_per_digest
# Create the release
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/${{ steps.get_version.outputs.VERSION }}/*
${{ steps.checksums.outputs.generated-files }}