diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 8086590..40a1939 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -19,7 +19,10 @@ jobs: - name: Build for ${{matrix.architecture}} run: | env GOOS=windows GOARCH=${{matrix.architecture}} \ - go build -o forgejo-runner-windows-${{matrix.architecture}}.exe + go build \ + LDFLAGS ?= -X "gitea.com/gitea/act_runner/internal/pkg/ver.version=v$(RELASE_VERSION)" + -ldflags "-s -w -X gitea.com/gitea/act_runner/internal/pkg/ver.version=${{ github.ref_name }}" \ + -o forgejo-runner-windows-${{matrix.architecture}}.exe - uses: actions/upload-artifact@v4 with: