Add MUSL builds to GH Actions

This commit is contained in:
Matthew Esposito 2023-06-02 10:47:03 -04:00
parent b5fc4bef28
commit 0fa2f99eea
No known key found for this signature in database
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,9 @@ jobs:
- name: Build
run: cargo build --release
- name: Build MUSL
run: cargo build --release --target x86_64-unknown-linux-musl
- name: Publish to crates.io
if: github.event_name == 'release'
run: cargo publish --no-verify --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
@ -54,6 +57,15 @@ jobs:
- name: Calculate SHA256 checksum
run: sha256sum target/release/libreddit > libreddit.sha256
- name: Calculate MUSL SHA512 checksum
run: sha512sum target/x86_64-unknown-linux-musl/release/libreddit > libreddit-musl.sha512
- name: Calculate MUSL SHA256 checksum
run: sha256sum target/x86_64-unknown-linux-musl/release/libreddit > libreddit-musl.sha256
- name: Move MUSL binary
run: mv target/x86_64-unknown-linux-musl/release/libreddit target/x86_64-unknown-linux-musl/release/libreddit-musl
- name: Release
uses: softprops/action-gh-release@v1
if: github.base_ref != 'master'
@ -65,6 +77,9 @@ jobs:
target/release/libreddit
libreddit.sha512
libreddit.sha256
target/x86_64-unknown-linux-musl/release/libreddit-musl
libreddit-musl.sha512
libreddit-musl.sha256
body: |
- ${{ github.event.head_commit.message }} ${{ github.sha }}
generate_release_notes: true