chore: no job runs on push #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [ pull_request, workflow_dispatch ] | |
permissions: read-all | |
env: | |
XCODE_PROJECT: "approf.xcodeproj" | |
XCODE_SCHEME: "approf" | |
CODE_SIGN_IDENTITY: "-" | |
BUILD_DIR: "build" | |
XCODE_ARCHIVE: "approf.xcarchive" | |
APP_NAME: "approf.app" | |
EXPORT_OPTIONS_PLIST: "exportOptions.plist" | |
DMG_NAME: "approf" | |
DMG_FILE_NAME: "approf.dmg" | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Xcode | |
run: | | |
sudo xcode-select -s "/Applications/Xcode_16_beta_4.app" | |
xcodebuild -version | |
- name: Allow macro | |
run: | | |
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES | |
- name: Build | |
run: xcodebuild -project "$XCODE_PROJECT" -scheme "$XCODE_SCHEME" archive CODE_SIGN_IDENTITY="$CODE_SIGN_IDENTITY" -archivePath "$BUILD_DIR/$XCODE_ARCHIVE" | |
- name: Export | |
run: | | |
plutil -convert xml1 - -o "$EXPORT_OPTIONS_PLIST" << EOF | |
{ | |
"destination": "export", | |
"method": "mac-application" | |
} | |
EOF | |
xcodebuild -exportArchive -archivePath "$BUILD_DIR/$XCODE_ARCHIVE" -exportPath "$BUILD_DIR" -exportOptionsPlist "$EXPORT_OPTIONS_PLIST" | |
- name: Resign App | |
run: codesign --force --deep -s "$CODE_SIGN_IDENTITY" "$BUILD_DIR/$APP_NAME" | |
- name: Make DMG | |
run: hdiutil create -srcdir "$BUILD_DIR" -volname "$DMG_NAME" "$DMG_FILE_NAME" | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Build | |
path: ${{ env.DMG_FILE_NAME }} |