-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.36 KB
/
go.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
57
name: Build and Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Install dependencies
run: go get .
- name: Build
run: |
mkdir -p bin
EXT=""
if [ "${{ matrix.goos }}" == "windows" ]; then EXT=".exe"; fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o bin/task-tracker-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: task-tracker-${{ matrix.goos }}-${{ matrix.goarch }}
path: bin/task-tracker-${{ matrix.goos }}-${{ matrix.goarch }}*
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
bin/task-tracker-linux-amd64
bin/task-tracker-linux-arm64
bin/task-tracker-windows-amd64.exe
bin/task-tracker-windows-arm64.exe
draft: true
generate_release_notes: true