2024-10-01 21:55:30 +00:00
|
|
|
name: Release Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release - ${{ matrix.release_for }}
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
2024-10-02 05:54:16 +00:00
|
|
|
- release_for: Linux x86_64
|
|
|
|
os: ubuntu-latest
|
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
bin: lowfi
|
|
|
|
name: lowfi-linux-x86_64
|
|
|
|
command: build
|
2024-10-01 21:55:30 +00:00
|
|
|
|
|
|
|
- release_for: Windows x86_64
|
|
|
|
os: windows-latest
|
|
|
|
target: x86_64-pc-windows-msvc
|
|
|
|
bin: lowfi.exe
|
|
|
|
name: lowfi-windows-x86_64.exe
|
|
|
|
command: build
|
|
|
|
|
2024-10-01 22:10:38 +00:00
|
|
|
- release_for: MacOS x86_64
|
2024-10-01 21:55:30 +00:00
|
|
|
os: macos-latest
|
|
|
|
target: x86_64-apple-darwin
|
|
|
|
bin: lowfi
|
|
|
|
name: lowfi-darwin-x86_64
|
|
|
|
command: build
|
|
|
|
|
2024-10-01 22:10:38 +00:00
|
|
|
- release_for: MacOS aarch64
|
2024-10-01 21:55:30 +00:00
|
|
|
os: macos-latest
|
|
|
|
target: aarch64-apple-darwin
|
|
|
|
bin: lowfi
|
|
|
|
name: lowfi-darwin-aarch64
|
|
|
|
command: build
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: "true"
|
|
|
|
|
2024-10-01 22:10:38 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
2024-10-01 22:41:50 +00:00
|
|
|
run: |
|
2024-10-02 05:56:11 +00:00
|
|
|
sudo apt install -y libasound2-dev librust-alsa-sys-dev librust-curl+openssl-sys-dev
|
2024-10-01 22:10:38 +00:00
|
|
|
|
2024-10-02 16:38:09 +00:00
|
|
|
- name: Build binary
|
2024-10-01 21:55:30 +00:00
|
|
|
uses: houseabsolute/actions-rust-cross@v0
|
|
|
|
with:
|
|
|
|
command: ${{ matrix.command }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
args: "--locked --release"
|
|
|
|
|
|
|
|
- name: Rename binary
|
|
|
|
run: |
|
|
|
|
cd ./target/${{ matrix.target }}/release
|
|
|
|
mv ${{ matrix.bin }} ${{ matrix.name }}
|
|
|
|
|
|
|
|
- name: Upload binary to release
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
gh release upload ${{github.event.release.tag_name}} \
|
|
|
|
./target/${{ matrix.target }}/release/${{ matrix.name }} \
|