Skip to content

Commit

Permalink
更新 GitHub Action 中的 checkout 和 setup-go 版本,添加构建信息输出
Browse files Browse the repository at this point in the history
  • Loading branch information
zgxkbtl committed Dec 2, 2024
1 parent 4470ba4 commit d76f35d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
goarch: arm64

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.23'

Expand All @@ -39,6 +39,11 @@ jobs:
if [ "${{ matrix.goos }}" = "windows" ]; then
OUTPUT="${OUTPUT}.exe"
fi
echo "Building ${OUTPUT} for ${{ matrix.goos }} ${{ matrix.goarch }}"
echo "Version: ${VERSION}"
echo "Build Time: ${BUILD_TIME}"
echo "Git Commit: ${GIT_COMMIT}"
go build -ldflags "-X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GIT_COMMIT} -X main.Version=${VERSION}" -o ${OUTPUT}
Expand Down

0 comments on commit d76f35d

Please sign in to comment.