Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 70a8cae

Browse files
committed
fix: checksum
1 parent 579cdc1 commit 70a8cae

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
brew install mingw-w64
3636
# Go Build
3737
- name: Build Binary
38-
run: make build-cross gen-checksum
38+
run: make build-cross
3939
# Create Git Release
4040
- name: Extract Tag from Ref
4141
if: startsWith(github.ref, 'refs/tags/')

scripts/cross-build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ LD_FLAGS="-s -w -X github.com/gptscript-ai/knowledge/version.Version=${GIT_TAG}"
66

77
export CGO_ENABLED=1
88

9+
mkdir -p dist/
10+
touch dist/checksums.txt
11+
912
if [ "$(go env GOOS)" = "linux" ]; then
1013
# Linux: amd64, arm64
1114
GOARCH=amd64 go build -o dist/knowledge-linux-amd64 -tags "${GO_TAGS}" -ldflags "${LD_FLAGS}\" -extldflags \"-static\" " .
15+
16+
# Checksum
17+
sha256sum dist/knowledge-linux-amd64 >> dist/checksums.txt
1218
else
1319

1420
# Windows: amd64
@@ -17,4 +23,7 @@ else
1723
# Darwin: amd64, arm64
1824
GOARCH=amd64 go build -o dist/knowledge-darwin-amd64 -tags "${GO_TAGS}" -ldflags "${LD_FLAGS}" .
1925
GOARCH=arm64 go build -o dist/knowledge-darwin-arm64 -tags "${GO_TAGS}" -ldflags "${LD_FLAGS}" .
26+
27+
# Checksum
28+
shasum -a 256 dist/knowledge-windows-amd64 dist/knowledge-darwin-amd64 dist/knowledge-darwin-arm64 >> dist/checksums.txt
2029
fi

0 commit comments

Comments
 (0)