✨ 修复圆角的问题 #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
GIT_TERMINAL_PROMPT: 1 | |
GOPRIVATE: git.liteyuki.icu | |
GONOSUMDB: git.liteyuki.icu | |
jobs: | |
build: | |
name: Build and Cross-Compile | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [ linux, windows, darwin ] | |
goarch: [ amd64, arm64, arm, "386" ] | |
exclude: | |
- goos: darwin | |
goarch: "386" | |
- goos: darwin | |
goarch: arm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22 | |
- name: Auth For Private Dependencies | |
run: git config --global url."https://${{ secrets.GITEA_TOKEN }}@git.liteyuki.icu".insteadOf "https://git.liteyuki.icu" | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Compile | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
CGO_ENABLED: 0 | |
run: | | |
OUTPUT_NAME=server-status-server | |
if [ "${{ matrix.goos }}" == "windows" ]; then OUTPUT_NAME="${OUTPUT_NAME}.exe"; fi | |
go build -o build/${GOOS}-${GOARCH}/${OUTPUT_NAME} main.go | |
- name: Upload binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: server-status-server-${{ matrix.goos }}-${{ matrix.goarch }} | |
path: build/${{ matrix.goos }}-${{ matrix.goarch }}/server-status-server* | |
if-no-files-found: warn |