-
Notifications
You must be signed in to change notification settings - Fork 15
51 lines (43 loc) · 1.03 KB
/
build.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
name: Build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/build.yml
- cmd/**/*.go
- makefile
- go.mod
- go.sum
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
goos: [windows, linux, darwin]
arch: [amd64, arm64]
name: "${{ matrix.goos }} | ${{ matrix.arch }}"
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: Build
run: |
make OS=${{ matrix.goos }} ARCH=${{ matrix.arch }} build
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: cpackget-${{ matrix.goos }}-${{ matrix.arch }}
path: build/cpackget*
retention-days: 7