forked from MetaCubeX/mihomo
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (46 loc) · 1.08 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:
paths-ignore:
- "docs/**"
- "README.md"
- ".github/ISSUE_TEMPLATE/**"
branches:
- Alpha
tags:
- "v*"
pull_request_target:
branches:
- Alpha
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [386, amd64, arm, arm64]
exclude:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: windows
goarch: arm64
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.22
- name: Build
run: |
export GOOS=${{ matrix.goos }}
export GOARCH=${{ matrix.goarch }}
go build -v -o output/${{ matrix.goos }}-${{ matrix.goarch }} ./...
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.goos }}-${{ matrix.goarch }}
path: |
output/${{ matrix.goos }}-${{ matrix.goarch }}