From 359050914133dc3758c2248dd54b35844d276230 Mon Sep 17 00:00:00 2001 From: dalance Date: Mon, 3 Jun 2024 12:09:05 +0900 Subject: [PATCH] Fix mac release script --- .github/workflows/release.yml | 5 ++++- Makefile | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 200fde9a..7031520e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,10 @@ jobs: shell: sh - if: matrix.os == 'macOS-latest' - run: make release_mac VERSION=${{github.ref_name}} + run: | + rustup target add x86_64-apple-darwin + make release_mac_x86_64 VERSION=${{github.ref_name}} + make release_mac_aarch64 VERSION=${{github.ref_name}} shell: sh - if: matrix.os == 'windows-latest' diff --git a/Makefile b/Makefile index 3493ef60..532c43f3 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ release_win: mv tmp/${BIN_NAME}-${VERSION}-x86_64-win.zip ./ rm -rf tmp/ -release_mac: +release_mac_x86_64: cargo build --release --target=x86_64-apple-darwin rm -rf tmp mkdir -p tmp/bin/ tmp/doc/ @@ -122,3 +122,16 @@ release_mac: zip ${BIN_NAME}-${VERSION}-x86_64-mac.zip -r * mv tmp/${BIN_NAME}-${VERSION}-x86_64-mac.zip ./ rm -rf tmp/ + +release_mac_aarch64: + cargo build --release --target=aarch64-apple-darwin + rm -rf tmp + mkdir -p tmp/bin/ tmp/doc/ + cp ${RELEASE_MANUAL} tmp/doc/ + cp rulesets/*.toml tmp/bin/ + cp $$(find rulesets/ -type f -perm -u+x) tmp/bin/ + cp target/aarch64-apple-darwin/release/${BIN_NAME} tmp/bin/ + cd tmp/ && \ + zip ${BIN_NAME}-${VERSION}-aarch64-mac.zip -r * + mv tmp/${BIN_NAME}-${VERSION}-aarch64-mac.zip ./ + rm -rf tmp/