From f48ea77483e8b5140ff9d1156183f0b3e1d775f0 Mon Sep 17 00:00:00 2001 From: Jan Kaul Date: Wed, 13 Nov 2024 16:36:12 +0100 Subject: [PATCH] use cross for release --- .github/workflows/release.yml | 52 +++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90efc89..f6713ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,28 +5,40 @@ on: - "v*" jobs: release: - runs-on: ${{ matrix.os }} + name: Release - ${{ matrix.platform.os-name }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + platform: + - os-name: Linux-x86_64 + runs-on: ubuntu-20.04 + target: x86_64-unknown-linux-gnu + + - os-name: Windows-x86_64 + runs-on: windows-latest + target: x86_64-pc-windows-msvc + + - os-name: macOS-x86_64 + runs-on: macOS-latest + target: x86_64-apple-darwin + binary: + - name: frostbow + - name: frostbow-sql + - name: frostbow-glue + + runs-on: ${{ matrix.platform.runs-on }} steps: - - uses: actions/checkout@v4 - - name: test build rust project - uses: lxl66566/rust-simple-release@main + - name: Checkout + uses: actions/checkout@v3 + - name: Build binary + uses: houseabsolute/actions-rust-cross@v0 with: - targets: x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-apple-darwin - token: ${{ secrets.GITHUB_TOKEN }} - package: frostbow - release-sql: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v4 - - name: test build rust project - uses: lxl66566/rust-simple-release@main + command: ${{ matrix.platform.command }} + target: ${{ matrix.platform.target }} + args: "--locked --release" + strip: true + working-directory: ${{ matrix.binary.name }} + - name: Publish artifacts and release + uses: houseabsolute/actions-rust-release@v0 with: - targets: x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-apple-darwin - token: ${{ secrets.GITHUB_TOKEN }} - package: frostbow-sql + executable-name: ${{ matrix.binary.name }} + target: ${{ matrix.platform.target }}