diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4c461b941d93..efca1ac10154 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -140,6 +140,7 @@ jobs: # used during macOS notarization AC_USERNAME: ${{ secrets.ENG_CI_APPLE_ID }} AC_PASSWORD: ${{ secrets.ENG_CI_APPLE_ID_PASS }} + GOPATH: ${{ env.GOPATH }} - uses: anchore/sbom-action@v0 continue-on-error: true diff --git a/.github/workflows/validations.yaml b/.github/workflows/validations.yaml index 463e645a8c48..24e8f79937bf 100644 --- a/.github/workflows/validations.yaml +++ b/.github/workflows/validations.yaml @@ -180,6 +180,8 @@ jobs: - name: Build snapshot artifacts run: make snapshot + env: + GOPATH: ${{ env.GOPATH }} - uses: actions/upload-artifact@v2 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4164d1ea8dbb..d083bbda0e8a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -22,7 +22,10 @@ builds: mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}' env: &build-env - CGO_ENABLED=0 + gcflags: + - -trimpath={{.Env.GOPATH}} ldflags: &build-ldflags | + -buildid= -w -s -extldflags '-static'