diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8cf77ed7..0c0106ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,24 +26,29 @@ jobs: run: cargo publish -p gengo-bin github: - name: GitHub Assets + name: Build ${{ matrix.target }} runs-on: ${{ matrix.os }} permissions: contents: write strategy: fail-fast: false matrix: - os: - - macos-latest - - ubuntu-latest - - windows-latest + include: + - os: macos-latest + target: x86_64-apple-darwin + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + - os: windows-latest + target: x86_64-pc-windows-msvc steps: - uses: actions/checkout@v4 + - name: Add target + run: rustup target add ${{ matrix.target }} - name: Build Assets run: | - cargo build --release - tar -C target/release/ -czvf gengo-${{ runner.os }}-${{ runner.arch }}.tar.gz gengo${{ runner.os == 'Windows' && '.exe' || '' }} + cargo build --release --target ${{ matrix.target }} + tar -C target/${{ matrix.target }}/release/ -czvf gengo-${{ matrix.target }}.tar.gz gengo${{ runner.os == 'Windows' && '.exe' || '' }} - name: Upload Release Assets if: ${{ github.event_name != 'workflow_dispatch' }} uses: softprops/action-gh-release@v1