From 493af251cef308b0465179fe2373af7108b11ea3 Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Fri, 8 Nov 2024 00:21:32 +0100 Subject: [PATCH] try universal app build --- .github/workflows/main.yml | 47 ++++++-------------------------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5d5684..a615027 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: - name: Cross-compile for Windows run: fyne-cross windows - build-mac-arm: + build-mac: runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -53,9 +53,11 @@ jobs: go-version: 1.22 - name: Compile for MacOS run: | - GOOS=darwin GOARCH=arm64 go build + GOOS=darwin GOARCH=arm64 go build -o SoundscapeSync_arm64 + CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o SoundscapeSync_amd64 + lipo -create -output SoundscapeSync SoundscapeSync_amd64 SoundscapeSync_arm64 mkdir -p SoundscapeSync.app/Contents/MacOS - mv soundscape-sync SoundscapeSync.app/Contents/MacOS/SoundscapeSync + mv SoundscapeSync SoundscapeSync.app/Contents/MacOS/SoundscapeSync echo '' > SoundscapeSync.app/Contents/Info.plist echo '' >> SoundscapeSync.app/Contents/Info.plist echo '' >> SoundscapeSync.app/Contents/Info.plist @@ -72,43 +74,8 @@ jobs: echo '' >> SoundscapeSync.app/Contents/Info.plist chmod +x SoundscapeSync.app/Contents/MacOS/SoundscapeSync - - name: Upload macOS arm artifact + - name: Upload macOS artifact uses: actions/upload-artifact@v4 with: name: macos-build - path: SoundscapeSync-arm.app - - build-mac-intel: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.22 - - name: Compile for MacOS - run: | - CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build - mkdir -p SoundscapeSync.app/Contents/MacOS - mv soundscape-sync SoundscapeSync.app/Contents/MacOS/SoundscapeSync - echo '' > SoundscapeSync.app/Contents/Info.plist - echo '' >> SoundscapeSync.app/Contents/Info.plist - echo '' >> SoundscapeSync.app/Contents/Info.plist - echo '' >> SoundscapeSync.app/Contents/Info.plist - echo ' CFBundleName' >> SoundscapeSync.app/Contents/Info.plist - echo ' SoundscapeSync' >> SoundscapeSync.app/Contents/Info.plist - echo ' CFBundleVersion' >> SoundscapeSync.app/Contents/Info.plist - echo ' 1.0' >> SoundscapeSync.app/Contents/Info.plist - echo ' CFBundleIdentifier' >> SoundscapeSync.app/Contents/Info.plist - echo ' com.cloonar.soundscape-sync' >> SoundscapeSync.app/Contents/Info.plist - echo ' Executable' >> SoundscapeSync.app/Contents/Info.plist - echo ' SoundscapeSync' >> SoundscapeSync.app/Contents/Info.plist - echo '' >> SoundscapeSync.app/Contents/Info.plist - echo '' >> SoundscapeSync.app/Contents/Info.plist - chmod +x SoundscapeSync.app/Contents/MacOS/SoundscapeSync - - - name: Upload macOS intel artifact - uses: actions/upload-artifact@v4 - with: - name: macos-build - path: SoundscapeSync-intel.app + path: SoundscapeSync.app