diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c214e32..a438cfa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,13 +2,45 @@ name: release on: release: types: [published] - + +permissions: + contents: read + 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: |