-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.12 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
name: Go
on:
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: ["linux"]
goarch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -o "livebox-cli-${GOOS}-${GOARCH}" cmd/livebox-cli/main.go
- uses: actions/upload-artifact@v4
with:
name: livebox-cli-${{ matrix.goos }}-${{ matrix.goarch }}
path: livebox-cli-${{ matrix.goos }}-${{ matrix.goarch }}
retention-days: 1
upload:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/*