#!/bin/sh set -eu target="$1" cd "${GITHUB_WORKSPACE:-$(pwd)}" # The runner overrides env vars from the workflow for action containers, so re-assert the # toolchain path the image installed to, and keep the registry in the workspace for caching. export RUSTUP_HOME=/usr/local/rustup export CARGO_HOME="${PWD}/.cargo-cache" bin=guac-cli case "$target" in *windows*) bin=guac-cli.exe ;; esac (cd cli && cargo zigbuild --release --target "$target") artifact="target/${target}/release/${bin}" if [ ! -f "$artifact" ]; then artifact="cli/${artifact}" fi mkdir -p dist zip -j "dist/guac-cli-${target}.zip" "$artifact"