-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 859 Bytes
/
release.yml
File metadata and controls
31 lines (31 loc) · 859 Bytes
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
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Only build tag with semantic versioning format
jobs:
build:
runs-on: ubuntu-latest
steps:
# checkout the repository
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# install upx to compress the binary
- name: Install upx
run: sudo apt-get install -y upx
# Install specific version of go
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.18
# Run goreleaser with command line flag
- name: Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: -f .goreleaser.yml release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}