Rust Release Build & Publish
docker run --rm -it ubuntu /bin/bash
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y build-essential libssl-dev pkg-config curl git openssh-client unzip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
curl https://rclone.org/install.sh | bash
export RCLONE_CONFIG="/rclone.conf"
echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
mkdir -p /root/.ssh
echo "$DEPLOY_KEY" > /root/.ssh/deploy_key
chmod 600 /root/.ssh/deploy_key
ssh-keyscan github.com >> /root/.ssh/known_hosts
chmod 600 /root/.ssh/known_hosts
mkdir -p /app
GIT_SSH_COMMAND="ssh -i /root/.ssh/deploy_key" git clone $REPO_URL /app
cd /app
FULL_NAME=$BINARY_NAME-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed -e 's/x86_64/amd64/' -e 's/armv6l/arm/' -e 's/armv7l/arm/' -e 's/aarch64/arm64/')
cargo build --release && \
cp target/release/$BINARY_NAME $FULL_NAME
rclone copy "$FULL_NAME" remote_destination:"$RCLONE_COPY_PATH"
2026-08-15T06:40:52.964029538+00:00