Build a Linux amd64 release binary and upload it to the GitHub release page for tag $ARGUMENTS (e.g. v0.1.0).
-
Verify the release exists:
gh release view $ARGUMENTS
-
Cross-compile for Linux amd64 using cargo-zigbuild with the rustup toolchain (Homebrew rustc lacks cross-compilation targets):
PATH="/Users/mlv/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$HOME/.cargo/bin:/opt/homebrew/bin:$PATH" \
cargo zigbuild --release --target x86_64-unknown-linux-musl
-
Verify the binary:
file target/x86_64-unknown-linux-musl/release/https_proxy
Expect: ELF 64-bit LSB executable, x86-64, statically linked, stripped
-
Zip the binary:
cd target/x86_64-unknown-linux-musl/release
zip https_proxy-$ARGUMENTS-linux-amd64.zip https_proxy
-
Upload to the release (replace existing asset if present):
gh release upload $ARGUMENTS <full-path-to-zip> --clobber
-
Confirm upload:
gh release view $ARGUMENTS