From 6e4e1727b29151ed008a1de68101cc0291547871 Mon Sep 17 00:00:00 2001 From: Bittrance Date: Fri, 15 Mar 2024 16:24:28 +0100 Subject: [PATCH] Include binaires in release. --- .github/workflows/release.yaml | 36 ++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c214e32..71d3a30 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,13 +2,45 @@ name: release on: release: types: [published] - + +permissions: + contents: write + packages: write + jobs: + binary: + strategy: + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + - os: windows-latest + target: x86_64-apple-darwin + - os: macos-latest + target: x86_64-pc-windows-msvc + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + target: ${{ matrix.target }} + toolchain: stable + - run: cargo clippy + - run: cargo build --release + - if: matrix.os == 'ubuntu-latest' + run: mv target/release/kitops target/release/kitops-x86_64-unknown-linux-gnu + - if: matrix.os == 'windows-latest' + run: mv target/release/kitops.exe target/release/kitops-x86_64-pc-windows-msvc.exe + - if: matrix.os == 'macos-latest' + run: mv target/release/kitops target/release/kitops-x86_64-apple-darwin + - uses: softprops/action-gh-release@v2 + with: + files: target/release/kitops-* image: runs-on: ubuntu-latest steps: - name: Clone repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare id: prep run: |