Skip to content

Commit

Permalink
ci: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vaaandark committed Nov 24, 2023
1 parent b5e640f commit 15db1af
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,40 @@ name: CI build

jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: Build for ${{ matrix.platform.os_name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform:
- os_name: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: dioxionary
asset_name: dioxionary-linux-amd64
- os: windows-latest
artifact_name: dioxionary.exe
asset_name: dioxionary-windows-amd64.exe
toolchain:
- stable
steps:
- name: Install dependencies for Linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libssl-dev libsqlite3-dev libasound2-dev
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
- run: sudo apt-get install libssl-dev libsqlite3-dev libasound2-dev
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
args: --release
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--release"
strip: true
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.asset_name }}
path: target/release/${{ matrix.artifact_name }}
name: ${{ matrix.platform.asset_name }}
path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.artifact_name }}
- name: Release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
file: target/${{ matrix.platform.target }}/release/${{ matrix.platform.artifact_name }}
asset_name: ${{ matrix.platform.asset_name }}
tag: ${{ github.ref }}

0 comments on commit 15db1af

Please sign in to comment.