diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a23d42..90e1292 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,16 +8,30 @@ on: tags: - v[0-9]+.* jobs: - create-release: + build: + name: Build and release binaries runs-on: ubuntu-latest + + strategy: + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + steps: - - uses: actions/checkout@v4 - - uses: taiki-e/create-gh-release-action@v1 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} + toolchain: stable + override: true + target: ${{ matrix.platform == 'windows-latest' && 'x86_64-pc-windows-gnu' || 'x86_64-unknown-linux-gnu' || 'x86_64-apple-darwin' }} + + - name: Build binary + run: cargo build --release --package cli upload-assets: - needs: create-release + needs: build strategy: matrix: include: