Fix the problem with the failed compilation of openssl-sys in slim co… #87
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: Rust CI and Release | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_release: | |
runs-on: ubuntu-latest | |
container: | |
image: rust:slim-bullseye | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OpenSSL | |
run: | | |
apt-get update | |
apt-get install -y pkg-config libssl-dev | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Build Release | |
run: cargo build --release --verbose | |
- name: Prepare Release Asset | |
run: | | |
mkdir -p assets/bin/linux_x64 | |
cp target/release/wami assets/bin/linux_x64/wami | |
chmod +x assets/bin/linux_x64/wami | |
- name: Create Releass | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: assets/bin/linux_x64/wami | |
tag_name: linux_x64 | |
name: Release Linux x64 | |
body: This is the new release of the Linux x64 wami binary file | |
draft: false | |
prerelease: false | |
- name: Clean up | |
if: always() | |
run: | | |
rm -rf assets | |
rm -rf target | |
cargo clean | |
rm -rf ~/.cargo/registry | |
rm -rf ~/.cargo/git | |
df -h # Displays the available storage space |