mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 21:18:42 +00:00
Create universal binary for MacOS in workflow release (#551)
* Create universal binary for MacOS in workflow build * Update README Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
62e350eba9
commit
707b173de1
2 changed files with 26 additions and 1 deletions
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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`!
|
||||
|
|
Loading…
Add table
Reference in a new issue