This commit is contained in:
spiritlhl 2024-05-01 08:51:07 +00:00
parent 2d1f837177
commit 2feded3abc
2 changed files with 15 additions and 15 deletions

View File

@ -23,7 +23,6 @@ jobs:
- name: Build and Test on Default Platform - name: Build and Test on Default Platform
run: | run: |
cd ${{ github.workspace }}
go build -v ./... go build -v ./...
go test -v ./... go test -v ./...
@ -31,6 +30,21 @@ jobs:
name: Release Go Binary name: Release Go Binary
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 'stable'
- name: Build and Release
run: |
mkdir -p bin
cd cmd
go build -o ../bin/backtrace-${{ matrix.goos }}-${{ matrix.goarch }} -v .
strategy: strategy:
matrix: matrix:
goos: [windows, freebsd, openbsd, linux, darwin] goos: [windows, freebsd, openbsd, linux, darwin]
@ -89,17 +103,3 @@ jobs:
- goos: openbsd - goos: openbsd
goarch: arm goarch: arm
goarm: 7 goarm: 7
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
GOMIPS: ${{ matrix.gomips }}
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Release Go Binary
run: |
cd ${{ github.workspace }}
go build -o backtrace-${{ matrix.goos }}-${{ matrix.goarch }} -v ./...