Skip to content

Commit

Permalink
chore: ci build for MacOS arm + intel
Browse files Browse the repository at this point in the history
  • Loading branch information
lyonbot committed Sep 29, 2024
1 parent e59a375 commit 3e29da4
Showing 1 changed file with 10 additions and 5 deletions.
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

0 comments on commit 3e29da4

Please sign in to comment.