mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 05:31:44 +08:00
33 lines
807 B
YAML
33 lines
807 B
YAML
name: Build
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
goarch: [ amd64, arm64 ]
|
|
fail-fast: true
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
cache: true
|
|
go-version: 'stable'
|
|
- name: Install dependencies
|
|
run: go mod tidy
|
|
- name: Build ${{ matrix.goarch }}
|
|
env:
|
|
CGO_ENABLED: 0
|
|
GOOS: linux
|
|
GOARCH: ${{ matrix.goarch }}
|
|
run: go build -ldflags '-s -w --extldflags "-static -fpic"' -o panel-${{ matrix.goarch }}
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: panel-${{ matrix.goarch }}
|
|
path: panel-${{ matrix.goarch }}
|