mirror of
https://github.com/talwat/lowfi
synced 2025-01-13 20:01:27 +00:00
ci: add build workflow
This commit is contained in:
parent
e599ada5ce
commit
6d912a8d5e
75
.github/workflows/build.yml
vendored
Normal file
75
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release - ${{ matrix.release_for }}
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- release_for: Linux x86_64
|
||||
os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
bin: lowfi
|
||||
name: lowfi-linux-x86_64
|
||||
command: build
|
||||
|
||||
- release_for: Linux aarch64
|
||||
os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
bin: lowfi
|
||||
name: lowfi-linux-aarch64
|
||||
command: build
|
||||
|
||||
- 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
|
||||
|
||||
- release_for: MacOS-x86_64
|
||||
os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
bin: lowfi
|
||||
name: lowfi-darwin-x86_64
|
||||
command: build
|
||||
|
||||
- release_for: MacOS-aarch64
|
||||
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"
|
||||
|
||||
- name: Build binary
|
||||
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 }} \
|
Loading…
x
Reference in New Issue
Block a user