Release #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
build_tag: | |
description: 'release name' | |
required: true | |
type: string | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build linux binary | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools libssl-dev pkg-config | |
rustup target add x86_64-unknown-linux-musl | |
export OPENSSL_DIR=/usr/lib/x86_64-linux-musl/ | |
export OPENSSL_INCLUDE_DIR=/usr/include/x86_64-linux-musl/openssl | |
export OPENSSL_STATIC=1 | |
echo "Using OPENSSL_DIR: $OPENSSL_DIR" | |
echo "Using OPENSSL_INCLUDE_DIR: $OPENSSL_INCLUDE_DIR" | |
mkdir -p out | |
for PACK in anda_bot | |
do | |
cargo build --release --locked -p $PACK --target x86_64-unknown-linux-musl | |
cp "target/x86_64-unknown-linux-musl/release/$PACK" "out/" | |
SHA256="$(sha256sum < "out/$PACK" | sed 's/ .*$//g')" | |
echo $SHA256 > "out/$PACK.$SHA256.txt" | |
done | |
ls -lah out | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: out/* | |
name: ${{ inputs.build_tag }} |