Skip to content

Commit

Permalink
init ci macos config for rosseta
Browse files Browse the repository at this point in the history
  • Loading branch information
victorwads committed Aug 14, 2024
1 parent bd4526d commit 9fd08b2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos_bundle_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
with:
repo_token: ${{ secrets.TOKEN }}
file: macOs/QRookie_arm64.dmg
asset_name: QRookie_macOs_arm64.dmg
asset_name: QRookie_${{ github.ref }}_macOs_arm64.dmg
tag: ${{ github.ref }}
7 changes: 4 additions & 3 deletions .github/workflows/macos_bundle_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
runs-on: macos-13
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
Expand All @@ -19,13 +19,14 @@ jobs:
- name: Build
run: |
cd macOs/
./signApp.sh
arch -x86_64 ./signApp.sh
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.TOKEN }}
file: macOs/QRookie_x86_64.dmg
asset_name: QRookie_macOs_x86_64.dmg
asset_name: QRookie_${{ github.ref }}_macOs_x86_64.dmg
tag: ${{ github.ref }}
2 changes: 1 addition & 1 deletion macOs/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<key>CFBundleIconFile</key>
<string>icon</string>
<key>LSMinimumSystemVersion</key>
<string>12</string>
<string>13</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion macOs/projectConfig.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
export ARCH=$(arch)
export OS_TARGET="12"
export OS_TARGET="13"
if [[ "$ARCH" == "arm64" ]]; then
export ARCH_NAME="arm64"
eval "$(/opt/homebrew/bin/brew shellenv)"
Expand Down
5 changes: 4 additions & 1 deletion macOs/signApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ xcrun notarytool submit "$DMG_NAME" \
--keychain-profile "$ACCOUNT_PROFILE" \
--wait

xcrun stapler staple "$DMG_NAME"

printf "\e[1;32mVerifying the app bundle...\e[0m\n"
spctl --assess --type exec -vv "${DMG_NAME}"
# spctl --assess --type exec -vv "${DMG_NAME}"
codesign --verify --deep --strict --verbose=2 "$APP_PATH"
codesign --verify --deep --strict --verbose=2 "${DMG_NAME}"

# Always returning true ensures that the github action will not terminate due to errors in this script.
Expand Down

0 comments on commit 9fd08b2

Please sign in to comment.