diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46d9bcf7..c11ec2d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,4 +122,28 @@ jobs: retention-days: 1 name: "${{ matrix.target }}.${{ env.CBIN }}" path: "${{ env.CBIN }}" - + macos_universal_bin: + needs: build + runs-on: macos-latest + env: + aarch64: aarch64-apple-darwin.cargo-binstall + x86_64: x86_64-apple-darwin.cargo-binstall + steps: + - name: Download aarch64 artifact + uses: actions/download-artifact@v3 + with: + name: ${{ env.aarch64 }} + path: ${{ env.aarch64 }} + - name: Download x86-64 artifact + uses: actions/download-artifact@v3 + with: + name: ${{ env.x86_64 }} + path: ${{ env.x86_64 }} + - name: Create universal binary for MacOS + run: lipo -create -output cargo-binstall $aarch64/cargo-binstall $x86_64/cargo-binstall + - name: Upload output + uses: actions/upload-artifact@v3 + with: + retention-days: 1 + name: universal-apple-darwin.cargo-binstall + path: cargo-binstall diff --git a/README.md b/README.md index ace77482..9fb69869 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ We recommend using the pre-compiled ones because we optimize those more than a s | linux | arm64 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-aarch64-unknown-linux-musl.tgz | | macos | x86\_64 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-apple-darwin.zip | | macos | m1 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-aarch64-apple-darwin.zip | +| macos | universal | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-universal-apple-darwin.zip | | windows | x86\_64 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-pc-windows-msvc.zip | To upgrade, use `cargo binstall cargo-binstall`!