diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8dd784d..5ff16e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,21 +12,40 @@ env: jobs: build-artifacts: name: Build a release artifacts - runs-on: ubuntu-latest + runs-on: ${{ matrix.build.os }} strategy: fail-fast: false matrix: - target: - - x86_64-unknown-linux-gnu - - x86_64-unknown-linux-musl - - aarch64-unknown-linux-gnu - - armv7-unknown-linux-gnueabihf - - x86_64-pc-windows-gnu - - x86_64-pc-windows-msvc - - x86_64-apple-darwin + build: + # Linux + - os: "ubuntu-latest" + target: "x86_64-unknown-linux-gnu" + cross: false + - os: "ubuntu-latest" + target: "x86_64-unknown-linux-gnu" + cross: true + - os: "ubuntu-latest" + target: "aarch64-unknown-linux-gnu" + cross: true + - os: "ubuntu-latest" + target: "armv7-unknown-linux-gnueabihf" + cross: true + # MacOS + - os: "macos-latest" + target: "x86_64-apple-darwin" + cross: false + # Windows + - os: "windows-latest" + target: "x86_64-pc-windows-msvc" + cross: false + - os: "windows-latest" + target: "x86_64-pc-windows-gnu" + cross: false + env: BUILD_DIR: "build" - TARGET: ${{ matrix.target }} + TARGET: ${{ matrix.build.target }} + USE_CROSS: ${{ matrix.build.cross }} steps: - name: Checkout uses: actions/checkout@v2 @@ -48,7 +67,7 @@ jobs: - name: Build uses: actions-rs/cargo@v1 with: - use-cross: true + use-cross: ${{ env.USE_CROSS }} command: build args: --target=${{ env.TARGET }} --release --verbose @@ -87,7 +106,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: artifacts - path: ${steps.package.outputs.name} + path: ${{ steps.package.outputs.name }} publish-release: name: Publish a new release