From 2feded3abc6b495f521b7977b9930e1c04b43834 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 1 May 2024 08:51:07 +0000 Subject: [PATCH] update --- .github/workflows/main.yaml | 30 +++++++++++++++--------------- main.go => cmd/main.go | 0 2 files changed, 15 insertions(+), 15 deletions(-) rename main.go => cmd/main.go (100%) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a520f58..1e547b3 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -23,7 +23,6 @@ jobs: - name: Build and Test on Default Platform run: | - cd ${{ github.workspace }} go build -v ./... go test -v ./... @@ -31,6 +30,21 @@ jobs: name: Release Go Binary runs-on: ubuntu-latest 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: matrix: goos: [windows, freebsd, openbsd, linux, darwin] @@ -89,17 +103,3 @@ jobs: - goos: openbsd goarch: arm 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 ./... \ No newline at end of file diff --git a/main.go b/cmd/main.go similarity index 100% rename from main.go rename to cmd/main.go