Skip to content

Commit

Permalink
Merge pull request #49 from SpiralOutDotEu/fix/release-use-compressed…
Browse files Browse the repository at this point in the history
…-files

Fix/release use compressed files
  • Loading branch information
SpiralOutDotEu committed Nov 3, 2023
2 parents dab16b6 + be4ce3b commit cf6e9d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module.exports = {
}],
["@semantic-release/github", {
"assets": [
{"path": "target/x86_64-unknown-linux-gnu/release/zk_whitelist", "name": "zk_whitelist", "label": "Linux binary"},
{"path": "target/x86_64-pc-windows-gnu/release/zk_whitelist.exe", "name": "zk_whitelist_win", "label": "Windows binary"},
{"path": "target/x86_64-apple-darwin/release/zk_whitelist", "name": "zk_whitelist_mac","label": "macOS binary"}
{"path": "zk_whitelist_linux.tar.gz", "label": "Linux binary"},
{"path": "zk_whitelist_windows.zip", "label": "Windows binary"},
{"path": "zk_whitelist_macos.tar.gz", "label": "macOS binary"}
]
}],
["@semantic-release/git", {
Expand Down
8 changes: 7 additions & 1 deletion update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ rm $CARGO_TOML.bak
rm $CARGO_LOCK.bak

# Build the project with the updated version number
cargo build --target x86_64-unknown-linux-gnu --release

# Prepare for multi-os build
sudo apt-get install podman
cargo install cross

# For Linux
cargo build --target x86_64-unknown-linux-gnu --release
tar -czvf zk_whitelist_linux.tar.gz -C target/x86_64-unknown-linux-gnu/release/ zk_whitelist

# Build for Windows
rustup target add x86_64-pc-windows-gnu
cross build --target x86_64-pc-windows-gnu --release
zip zk_whitelist_windows.zip -j target/x86_64-pc-windows-gnu/release/zk_whitelist.exe


# build for Mac
curl -L https://github.com/roblabla/MacOSX-SDKs/releases/download/13.3/MacOSX13.3.sdk.tar.xz | tar xJ
Expand All @@ -34,4 +39,5 @@ export PATH=$PATH:~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustl
export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=rust-lld
rustup target add x86_64-apple-darwin
cargo build --release --target x86_64-apple-darwin
tar -czvf zk_whitelist_macos.tar.gz -C target/x86_64-apple-darwin/release/ zk_whitelist

0 comments on commit cf6e9d0

Please sign in to comment.