-
Notifications
You must be signed in to change notification settings - Fork 9
42 lines (35 loc) · 924 Bytes
/
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
name: release
on:
push:
tags:
- "*"
jobs:
release:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "^1.19"
- name: Install dependencies
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Build
run: |
[ -z $version ] && version=$(git describe --tags)
mkdir -p dist
go get
go build -ldflags="-s -w -X main.version=$version"
tar -czf "dist/gtt-$(go env GOOS)-$(go env GOARCH).tar.gz" gtt
rm gtt
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*