From 215778631b51d9ad5ead2cf4d83b12a91ea4e5be Mon Sep 17 00:00:00 2001 From: samzong Date: Tue, 22 Oct 2024 13:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-release.yml | 23 ++++++++++++++--------- .github/workflows/pr-test.yml | 2 ++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 6b9b87a..d704692 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -18,15 +18,20 @@ jobs: - name: Build run: | - xcodebuild clean archive \ - -project MacMusicPlayer.xcodeproj \ - -scheme MacMusicPlayer \ - -archivePath $PWD/build/MacMusicPlayer.xcarchive \ - -configuration Release - CODE_SIGN_IDENTITY="" \ - CODE_SIGNING_REQUIRED=NO \ - ONLY_ACTIVE_ARCH=NO \ - ARCHS="arm64 x86_64" + xcodebuild clean build \ + -project MacMusicPlayer.xcodeproj \ + -scheme MacMusicPlayer \ + -configuration Release \ + -sdk macosx \ + -destination 'generic/platform=macOS,name=Any Mac' \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO \ + ONLY_ACTIVE_ARCH=NO \ + ARCHS="x86_64 arm64" + + - name: Verify architecture + run: | + lipo -info dist/MacMusicPlayer.app/Contents/MacOS/MacMusicPlayer - name: Create app run: | diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index d0f028d..3464a62 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -23,6 +23,8 @@ jobs: -project MacMusicPlayer.xcodeproj \ -scheme MacMusicPlayer \ -configuration Release \ + -sdk macosx \ + -destination 'generic/platform=macOS,name=Any Mac' \ -derivedDataPath build \ CODE_SIGN_IDENTITY="" \ CODE_SIGNING_REQUIRED=NO \