Update build-dev.yml

This commit is contained in:
里見 灯花 2024-10-11 00:14:39 +08:00 committed by GitHub
parent 505c2e559e
commit 1b5b34d265
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,6 @@ jobs:
goarch: [amd64, arm64] goarch: [amd64, arm64]
env: env:
OUTPUT_BINARY: ghproxy OUTPUT_BINARY: ghproxy
#OUTPUT_ARCHIVE: ghproxy.tar.gz
GO_VERSION: 1.23.2 GO_VERSION: 1.23.2
steps: steps:
@ -35,7 +34,7 @@ jobs:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Build - name: Build
run: | run: |
CGO_ENABLED=0 go build -o ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}} ./main.go CGO_ENABLED=0 go build -ldflags="-s -w" -o ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}} ./main.go
- name: Package - name: Package
run: | run: |
tar -czvf ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}.tar.gz ./${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}} tar -czvf ${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}.tar.gz ./${{ env.OUTPUT_BINARY }}-${{matrix.goos}}-${{matrix.goarch}}