Build and Notarize Support App - Manual Release #11
This file contains hidden or 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 and Notarize Support App - Manual Release | |
| on: [workflow_dispatch] | |
| jobs: | |
| build_with_signing: | |
| runs-on: macos-26 | |
| environment: production | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set build and version number to env | |
| run: | | |
| cd ./src | |
| APP_BUILD_NUMBER=$(xcrun agvtool vers -terse) | |
| echo "Build number: ${APP_BUILD_NUMBER}" | |
| echo "APP_BUILD_NUMBER=${APP_BUILD_NUMBER}" >> $GITHUB_ENV | |
| APP_VERSION=$(/usr/libexec/PlistBuddy -c Print:CFBundleShortVersionString Support/Info.plist) | |
| echo "Version number: ${APP_VERSION}" | |
| echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV | |
| - name: Install Developer ID Application certificate | |
| uses: apple-actions/import-codesign-certs@v2 | |
| with: | |
| keychain-password: ${{ github.run_id }} | |
| p12-file-base64: ${{ secrets.DEVELOPER_ID_APPLICATION_BASE64 }} | |
| p12-password: ${{ secrets.DEVELOPER_ID_APPLICATION_PASSWORD }} | |
| - name: Install Developer ID Installer certificate | |
| uses: apple-actions/import-codesign-certs@v2 | |
| with: | |
| create-keychain: false | |
| keychain-password: ${{ github.run_id }} | |
| p12-file-base64: ${{ secrets.DEVELOPER_ID_INSTALLER_BASE64 }} | |
| p12-password: ${{ secrets.DEVELOPER_ID_INSTALLER_PASSWORD }} | |
| - name: Build macOS app | |
| run: | | |
| ARCHIVE_PATH="./build/Support.xcarchive" | |
| APP_PATH="./build" | |
| ls -la /Applications | |
| # Set Xcode version to latest version available | |
| # XCODE_VERSION=$(ls -d /Applications/Xcode*.app 2>/dev/null | sort -V | tail -n 1) | |
| # echo "Path to latest Xcode version: ${XCODE_VERSION}" | |
| XCODE_VERSION="${{vars.XCODE_VERSION}}" | |
| # Select Xcode version | |
| sudo xcode-select -s "${XCODE_VERSION}" | |
| # Build and archive app | |
| "${XCODE_VERSION}/Contents/Developer/usr/bin/xcodebuild" clean build -project ./src/Support.xcodeproj -scheme "Support" -configuration Release CODE_SIGN_IDENTITY="Developer ID Application: Root3 B.V. (98LJ4XBGYK)" -archivePath $ARCHIVE_PATH archive | |
| "${XCODE_VERSION}/Contents/Developer/usr/bin/xcodebuild" -archivePath $ARCHIVE_PATH -exportArchive -exportPath $APP_PATH -exportOptionsPlist ./pkgbuild/exportOptions.plist | |
| chmod +x "${APP_PATH}/Support.app" | |
| - name: Notarize and package macOS app | |
| run: | |
| ./build_pkg_automated.zsh "${{env.APP_VERSION}}" "${{ secrets.APPLE_ID }}" "${{ secrets.APPLE_ID_APP_SPECIFIC_PASSWORD }}" "${{vars.XCODE_VERSION}}" | |
| - name: Upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Support ${{env.APP_VERSION}} | |
| path: build/ | |