diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 200fde9..7031520 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 3493ef6..532c43f 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/