Skip to content

Commit

Permalink
ci(release): 更新工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
junlongzzz committed Nov 11, 2024
1 parent 545043f commit 2ea5fbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true

- name: Get short commit SHA
id: commit-sha
Expand All @@ -43,11 +44,14 @@ jobs:
run: |
mkdir -p bin
go version
go build -ldflags="$LDFLAGS" -trimpath -o bin/gohomo-${{ matrix.goos }}-${{ matrix.goarch }}-${{ env.COMMIT_SHA_SHORT }}.exe .
go build -ldflags="${{ env.LDFLAGS }}" -trimpath -o bin/gohomo.exe .
zip -r bin/gohomo-${{ matrix.goos }}-${{ matrix.goarch }}-${{ env.COMMIT_SHA_SHORT }}.zip bin/
echo "${{ env.COMMIT_SHA_SHORT }}" > bin/version.txt
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: bin/*
files: |
bin/*.zip
bin/version.txt
make_latest: true

0 comments on commit 2ea5fbb

Please sign in to comment.