chore: add a github workflow to build for musl #6
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: Build MUSL Binary | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build MUSL Binary | |
runs-on: ubuntu-latest | |
container: | |
image: alpine:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apk add --no-cache rust cargo musl-dev openssl-dev openssl-libs-static | |
- name: Build binary | |
env: | |
OPENSSL_STATIC: true | |
run: | | |
rustup target add x86_64-unknown-linux-musl | |
cargo build --release --target x86_64-unknown-linux-musl | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binary-musl | |
path: target/x86_64-unknown-linux-musl/release/* | |
if-no-files-found: error |