-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.27 KB
/
aocli.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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Build, test, publish aocli
on:
push:
tags:
- 'aocli-v*'
jobs:
build:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: aocli
asset_name: linux-amd64-${{ github.ref_name }}
- os: windows-latest
artifact_name: aocli.exe
asset_name: windows-amd64-${{ github.ref_name }}
- os: macos-latest
artifact_name: aocli
asset_name: darwin-amd64-${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Tidy modules
run: go mod tidy
- name: Test
run: go test -v ./...
- name: Build aocli
run: go build -v -o ./${{ matrix.artifact_name }} ./cmd/aocli
- name: Upload binaries to artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: ./${{ matrix.artifact_name }}