-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.15 KB
/
release.yaml
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
name: Release client
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
deploy:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Build
env:
CGO_ENABLED: "0"
GO111MODULE: "on"
run: |
GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=$(basename ${{ github.ref }}) -X main.commit=${{ github.sha }}" -o bin/alfred-linux-amd64 ./client
GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=$(basename ${{ github.ref }}) -X main.commit=${{ github.sha }}" -o bin/alfred-darwin-amd64 ./client
GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w -X main.version=$(basename ${{ github.ref }}) -X main.commit=${{ github.sha }}" -o bin/alfred-darwin-arm64 ./client
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: bin/alfred-*
file_glob: true
overwrite: true
promote: true