Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Oct 31, 2024
1 parent 3339e95 commit 5ecf117
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
working-directory: ./scripts
run: |
# Windows 版本
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.windows-amd64.exe .
GOOS=windows GOARCH=386 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.windows-386.exe .
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.windows-amd64.exe .
GOOS=windows GOARCH=386 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.windows-386.exe .
# macOS 版本
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.darwin-amd64 .
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.darwin-arm64 .
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.darwin-amd64 .
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.darwin-arm64 .
# Linux 版本
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.linux-amd64 .
GOOS=linux GOARCH=386 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.linux-386 .
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.Version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" -o ../github-hosts.linux-arm64 .
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.linux-amd64 .
GOOS=linux GOARCH=386 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.linux-386 .
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" -o ../github-hosts.linux-arm64 .
cd .. # Return to root directory for zip operations
Expand All @@ -49,7 +49,7 @@ jobs:
zip -j github-hosts.linux-arm64.zip github-hosts.linux-arm64
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
github-hosts.windows-amd64.exe
Expand Down

0 comments on commit 5ecf117

Please sign in to comment.