File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 53
53
goarm : ${{ matrix.goarm }}
54
54
project_path : ' .'
55
55
binary_name : ${{ github.event.repository.name }}
56
- ldflags : ' -s -w -X main.ver=${{ needs.release-pr.outputs.version }}'
56
+ pre_command : ' export CGO_ENABLED=0'
57
+ build_flags : ' -trimpath' # Reproducible build (also needs -buildid= in ldflags).
58
+ ldflags : ' -s -w -buildid= -X main.ver=${{ needs.release-pr.outputs.version }}'
57
59
executable_compression : upx
58
60
md5sum : false
59
61
compress_assets : ' OFF'
@@ -136,8 +138,8 @@ jobs:
136
138
PLATFORMS+=("$platform")
137
139
done
138
140
139
- echo "Building for platforms: ${PLATFORMS[*]}"
140
-
141
+ SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)" # Reproducible build.
142
+ export SOURCE_DATE_EPOCH
141
143
docker buildx build \
142
144
--platform "$(IFS=, ; echo "${PLATFORMS[*]}")" \
143
145
--build-arg GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \
You can’t perform that action at this time.
0 commit comments