forked from mikigal/Anime4K-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.29 KB
/
matrix.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
name: Matrix build
on: push
jobs:
example:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- { runner: macos-latest, os: darwin, arch: amd64, tags: netcgo }
- { runner: macos-latest, os: darwin, arch: arm64, tags: netcgo }
- { runner: ubuntu-latest, os: linux, arch: amd64, env: CGO_ENABLED=0 }
- { runner: ubuntu-latest, os: linux, arch: amd64, env: CGO_ENABLED=0 }
- { runner: ubuntu-latest, os: windows, arch: amd64, env: CGO_ENABLED=0 }
steps:
- uses: actions/checkout@v3
- name: Build
uses: hashicorp/actions-go-build@main
with:
product_name: example-app
product_version: 1.2.3
go_version: 1.18
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
instructions: |-
cd ./testdata/example-app && \
${{ matrix.env }} \
go build \
-o "$BIN_PATH" \
-trimpath \
-buildvcs=false \
-tags="${{ matrix.tags }}" \
-ldflags "
-X 'main.Version=$PRODUCT_VERSION'
-X 'main.Revision=$PRODUCT_REVISION'
-X 'main.RevisionTime=$PRODUCT_REVISION_TIME'
"