Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build m1 binaries for macos #143

Merged
merged 4 commits into from
Jan 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,28 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux, macos, windows]
build: [linux, macos, macos-m1, windows]
include:
- build: linux
os: ubuntu-latest
asset_name: hyperlink-linux-x86_64
cargo_name: hyperlink
rustup_target: x86_64-unknown-linux-musl
- build: macos
os: macos-latest
asset_name: hyperlink-mac-x86_64
cargo_name: hyperlink
os: macos-latest
rustup_target: x86_64-apple-darwin
- build: windows
cargo_name: hyperlink.exe
asset_name: hyperlink-windows-x86_64.exe
os: windows-latest
asset_name: hyperlink-windows-x86_64.exe
cargo_name: hyperlink.exe
rustup_target: x86_64-pc-windows-msvc
- build: macos-m1
os: macos-latest
asset_name: hyperlink-mac-aarch64
cargo_name: hyperlink
rustup_target: aarch64-apple-darwin

steps:
- uses: actions/checkout@v1
Expand All @@ -67,9 +75,10 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.rustup_target }}

- name: Build
run: cargo build --verbose --release --locked
run: cargo build --verbose --release --locked --target ${{ matrix.rustup_target }}

- name: Upload Release Asset
id: upload-release-asset
Expand All @@ -78,6 +87,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get-release-info.outputs.upload_url }}
asset_path: ./target/release/${{ matrix.cargo_name }}
asset_path: ./target/${{ matrix.rustup_target }}/release/${{ matrix.cargo_name }}
asset_name: ${{ matrix.asset_name }}
asset_content_type: application/zip