Fix appicon bug #376
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: continuous integration build | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.gitignore' | |
| - '**/*.gitattributes' | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| DOTNET_NOLOGO: true # Disable the .NET logo | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry | |
| jobs: | |
| # MAUI Android Build | |
| build-android: | |
| runs-on: windows-2022 | |
| name: Android Build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@4d4a70f4a5b2a5a5329f13be4ac933f2c9206ac0 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Install MAUI Workload | |
| run: dotnet workload install maui --ignore-failed-sources | |
| - name: Restore Dependencies | |
| run: dotnet restore IfpaMaui.csproj | |
| - name: Build MAUI Android | |
| run: dotnet build IfpaMaui.csproj -c Release -f net9.0-android --no-restore | |
| # MAUI iOS Build | |
| build-ios: | |
| runs-on: macos-15 | |
| name: iOS Build | |
| environment: Release | |
| steps: | |
| - name: Use Xcode Version | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.4' | |
| - name: Checkout | |
| uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@4d4a70f4a5b2a5a5329f13be4ac933f2c9206ac0 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Install MAUI Workload | |
| run: dotnet workload install ios maui --source https://api.nuget.org/v3/index.json | |
| - name: Restore Dependencies | |
| run: dotnet restore IfpaMaui.csproj | |
| - name: Install the Apple certificate and provisioning profile | |
| env: | |
| BUILD_CERTIFICATE_BASE64: ${{ secrets.DISTRIBUTION_CERT_BASE64 }} | |
| P12_PASSWORD: ${{ secrets.DISTRIBUTION_CERT_PW }} | |
| BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.DISTRIBUTION_PROVISION_PROFILE_BASE64 }} | |
| DISTRIBUTION_WIDGET_PROVISION_PROFILE_BASE64: ${{ secrets.DISTRIBUTION_WIDGET_PROVISION_PROFILE_BASE64 }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
| run: | | |
| CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
| PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | |
| KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
| WIDGET_PP_PATH=$RUNNER_TEMP/widget_pp.mobileprovision | |
| echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
| echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH | |
| echo -n "$DISTRIBUTION_WIDGET_PROVISION_PROFILE_BASE64" | base64 --decode -o $WIDGET_PP_PATH | |
| security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
| security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
| security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
| security list-keychain -d user -s $KEYCHAIN_PATH | |
| mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
| cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | |
| WIDGET_PROFILE_UUID=$(grep -aA1 UUID $WIDGET_PP_PATH | grep -io "[-A-F0-9]\{36\}" | head -1) | |
| if [[ -z "$WIDGET_PROFILE_UUID" ]]; then | |
| echo "❌ Failed to extract UUID from widget provisioning profile" | |
| exit 1 | |
| fi | |
| cp $WIDGET_PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$WIDGET_PROFILE_UUID.mobileprovision | |
| echo "WIDGET_PROVISIONING_UUID=$WIDGET_PROFILE_UUID" >> $GITHUB_ENV | |
| - name: Build RankWidgetExtension | |
| run: | | |
| xcodebuild \ | |
| -project NativeIFPA/IFPA.xcodeproj \ | |
| -scheme RankWidgetExtension \ | |
| -configuration Release \ | |
| -sdk iphoneos \ | |
| -derivedDataPath NativeIFPA/DerivedData \ | |
| CODE_SIGN_STYLE=Manual \ | |
| CODE_SIGN_IDENTITY="iPhone Distribution: Ed Giardina (KH5JKUPW2Q)" \ | |
| CODE_SIGN_ENTITLEMENTS=RankWidgetExtension.entitlements \ | |
| DEVELOPMENT_TEAM=KH5JKUPW2Q \ | |
| PROVISIONING_PROFILE="$WIDGET_PROVISIONING_UUID" | |
| - name: Build MAUI iOS | |
| run: dotnet build IfpaMaui.csproj -c Release -f net9.0-ios -p:ArchiveOnBuild=true |