Add release workflow + prebuilt binary downloads in README

- GitHub Actions: build Linux x86_64 + aarch64 on tag push
- Upload tar.gz binaries to GitHub Releases
- README: download table linking to releases
This commit is contained in:
MattJackson
2026-04-06 11:44:46 -07:00
parent 3a0ea29cf7
commit 55bc96eeee
2 changed files with 61 additions and 1 deletions
+49
View File
@@ -0,0 +1,49 @@
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc' >> $GITHUB_ENV
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Package
run: |
cd target/${{ matrix.target }}/release
for bin in freemkv-info freemkv-test; do
if [ -f "$bin" ]; then
tar czf "../../../${bin}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" "$bin"
fi
done
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: '*.tar.gz'
+12 -1
View File
@@ -10,11 +10,22 @@ Part of the [freemkv](https://github.com/freemkv) project.
## Install
### As a library
```toml
[dependencies]
libfreemkv = "0.1"
libfreemkv = "0.2"
```
### Prebuilt binaries
Download from [GitHub Releases](https://github.com/freemkv/libfreemkv/releases):
| Platform | Architecture | Download |
|----------|-------------|----------|
| Linux | x86_64 | [freemkv-info](https://github.com/freemkv/libfreemkv/releases/latest) |
| Linux | aarch64 | [freemkv-info](https://github.com/freemkv/libfreemkv/releases/latest) |
## Usage
```rust