Skip to content

Commit

Permalink
chore: Update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
layou233 committed Jan 8, 2023
1 parent 25429fc commit d048866
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
goarch: mips
# END MIPS
# BEGIN PPC
- goos: linux
goarch: ppc64
- goos: linux
goarch: ppc64le
# - goos: linux
# goarch: ppc64
# - goos: linux
# goarch: ppc64le
# END PPC
# BEGIN LOONGARCH
- goos: linux
Expand Down Expand Up @@ -118,8 +118,12 @@ jobs:
- name: Tidy up Go Modules
run: go mod tidy

- name: Get Git Commit Hash
id: hash
run: echo "git_hash=$(git rev-parse --short HEAD || echo "unknown version")" >> $GITHUB_OUTPUT

- name: Build
run: go build -v -trimpath -ldflags "-s -w -buildid=" -o ZBProxy-${{ matrix.goos }}-${{ matrix.goarch }}-${{ matrix.goarm }}
run: go build -v -trimpath -ldflags '-X "github.com/layou233/ZBProxy/version.CommitHash=${{ steps.hash.outputs.git_hash }}" -s -w -buildid=' -o ZBProxy-${{ matrix.goos }}-${{ matrix.goarch }}-${{ matrix.goarm }}

- name: Handle for Windows Build
if: ${{ env.GOOS == 'windows' }}
Expand Down

0 comments on commit d048866

Please sign in to comment.