Skip to content

Commit 0ca34b3

Browse files
committed
fix: version variable content
1 parent a2aba58 commit 0ca34b3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
- name: golang build
3333
env:
3434
GOARCH: ${{ matrix.arch }}
35-
run: |
36-
cd cmd/gitops
37-
go build -ldflags="-s -w -X 'main.version=${{ github.ref_name }}'" .
35+
GOOS: ${{ matrix.os_name }}
36+
CGO_ENABLED: 0
37+
run: go build -o gitops -ldflags="-s -w -X 'main.version=${{ github.ref_name }}'" cmd/gitops/main.go
3838
- name: Upload binaries to release
3939
uses: svenstaro/upload-release-action@v2
4040
with:
4141
repo_token: ${{ secrets.GITHUB_TOKEN }}
42-
file: ${{ github.workspace }}/cmd/gitops/gitops${{ matrix.artifact_suffix }}
42+
file: gitops${{ matrix.artifact_suffix }}
4343
asset_name: gitops_${{ matrix.os_name }}_${{ matrix.arch }}${{ matrix.artifact_suffix }}
4444
tag: ${{ github.ref }}
4545
docker:

0 commit comments

Comments
 (0)