Skip to content

Commit

Permalink
chore(reproducibility): add buildid= and trimpath
Browse files Browse the repository at this point in the history
Signed-off-by: Batuhan Apaydın <[email protected]>
  • Loading branch information
developer-guy committed Feb 24, 2022
1 parent 598af89 commit b7fd314
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ jobs:

- name: Build snapshot artifacts
run: make snapshot
env:
GOPATH: ${{ env.GOPATH }}

- uses: actions/upload-artifact@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit b7fd314

Please sign in to comment.