-
Notifications
You must be signed in to change notification settings - Fork 12
38 lines (38 loc) · 1.19 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}