-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.05 KB
/
release-binary.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
name: Releases publication
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- id: vars
run: |
echo ::set-output name=go_version::$(cat go.mod | head -3 | tail -1 | cut -d ' ' -f 2)
echo "Using Go version ${{ steps.vars.outputs.go_version }}"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: Compile the source
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}