Skip to content

Commit

Permalink
Merge pull request #6702 from phanirithvij/main
Browse files Browse the repository at this point in the history
reduce release sizes and speed up release time
  • Loading branch information
reltuk authored Sep 28, 2023
2 parents 6865ba9 + 287c06b commit 01fa6d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/cd-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ jobs:
asset_path: go/out/dolt-windows-amd64.zip
asset_name: dolt-windows-amd64.zip
asset_content_type: application/zip
- name: Upload Windows Distro 7z
id: upload-windows-distro-7z
uses: dolthub/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: go/out/dolt-windows-amd64.7z
asset_name: dolt-windows-amd64.7z
asset_content_type: application/x-7z-compressed
- name: Upload Install Script
id: upload-install-script
uses: dolthub/upload-release-asset@v1
Expand Down
8 changes: 4 additions & 4 deletions go/utils/publishrelease/buildbinaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd $script_dir/../..
docker run --rm -v `pwd`:/src golang:"$GO_BUILD_VERSION"-buster /bin/bash -c '
set -e
set -o pipefail
apt-get update && apt-get install -y zip
apt-get update && apt-get install -y p7zip-full pigz
cd /src
BINS="dolt"
Expand All @@ -29,12 +29,12 @@ for tuple in $OS_ARCH_TUPLES; do
if [ "$os" = windows ]; then
obin="$bin.exe"
fi
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -o "$o/bin/$obin" "./cmd/$bin/"
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -trimpath -ldflags="-s -w" -o "$o/bin/$obin" "./cmd/$bin/"
done
if [ "$os" = windows ]; then
(cd out && zip -r "dolt-$os-$arch" "dolt-$os-$arch")
(cd out && 7z a "dolt-$os-$arch.zip" "dolt-$os-$arch" && 7z a "dolt-$os-$arch.7z" "dolt-$os-$arch")
else
tar czf "out/dolt-$os-$arch.tar.gz" -C out "dolt-$os-$arch"
tar cf - -C out "dolt-$os-$arch" | pigz -9 > "out/dolt-$os-$arch.tar.gz"
fi
done
Expand Down

0 comments on commit 01fa6d7

Please sign in to comment.