mirror of
https://github.com/snowykami/server-status-server.git
synced 2025-06-06 15:15:22 +00:00
🐛 添加构建工作流
This commit is contained in:
parent
e7ae5e1fcf
commit
a77c29a136
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -21,8 +21,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.22]
|
go-version: [1.22]
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
arch: [ "amd64", "arm64", "arm", "386" ]
|
arch: [amd64, arm64, arm, 386, ppc64, ppc64le, mips, mipsle, mips64, mips64le, s390x, riscv64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -41,12 +41,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
GOOS=${{ matrix.os == 'ubuntu-latest' && 'linux' || matrix.os == 'windows-latest' && 'windows'}}
|
GOOS=${{ matrix.os == 'ubuntu-latest' && 'linux' || matrix.os == 'windows-latest' && 'windows' || 'darwin' }}
|
||||||
GOARCH=${{ matrix.arch }}
|
GOARCH=${{ matrix.arch }}
|
||||||
go build -o build/${{ matrix.os }}/server-status-server
|
go build -o build/${{ matrix.os }}-${{ matrix.arch }}/server-status-server cmd/main.go
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: server-status-server-${{ matrix.os }}-${{ matrix.go-version }}
|
name: server-status-server-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
path: build/${{ matrix.os }}/server-status-server
|
path: build/${{ matrix.os }}-${{ matrix.arch }}/server-status-server
|
||||||
|
if-no-files-found: warn
|
Loading…
x
Reference in New Issue
Block a user