Skip to content

Commit

Permalink
Fix mac release script
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Jun 3, 2024
1 parent b314880 commit 3590509
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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/

0 comments on commit 3590509

Please sign in to comment.