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

chore: ci build for MacOS arm + intel #292

Merged
merged 1 commit into from
Oct 18, 2024
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
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-macos:
runs-on: macOS-latest
strategy:
matrix:
os: [macos-latest, macos-13] # -latest if for Apple Silicon, -13 is for Intel
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
Expand All @@ -114,13 +117,15 @@ jobs:
# run: MACOSX_DEPLOYMENT_TARGET=10.13 cargo bundle --release
run: cargo bundle --release
- name: Package
run: cd target/release/bundle/osx/ && zip -r macOS.zip Weylus.app
run: |
MACOS_BUILD_NAME=macos-$([ "${{ matrix.os }}" == "macos-latest" ] && echo "arm" || echo "intel")
echo "MACOS_BUILD_NAME=$MACOS_BUILD_NAME" >> $GITHUB_ENV
cd target/release/bundle/osx/ && zip -r ${MACOS_BUILD_NAME}.zip Weylus.app
- name: Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: |
target/release/bundle/osx/macOS.zip
name: ${{ env.MACOS_BUILD_NAME }}
path: target/release/bundle/osx/${{ env.MACOS_BUILD_NAME }}.zip
- name: ArtifactsDebug
if: failure()
uses: actions/upload-artifact@v4
Expand Down