{"id":48842221,"url":"https://github.com/tsjdev-apps/github-actions-dotnet-maui","last_synced_at":"2026-04-15T02:31:24.707Z","repository":{"id":346654353,"uuid":"1186532062","full_name":"tsjdev-apps/github-actions-dotnet-maui","owner":"tsjdev-apps","description":"Repository containing GitHub Actions to build and sign .NET MAUI applications.","archived":false,"fork":false,"pushed_at":"2026-03-24T20:23:27.000Z","size":1645,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T01:44:12.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsjdev-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"tsjdev-apps"}},"created_at":"2026-03-19T18:14:32.000Z","updated_at":"2026-03-24T20:22:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tsjdev-apps/github-actions-dotnet-maui","commit_stats":null,"previous_names":["tsjdev-apps/github-actions-dotnet-maui"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tsjdev-apps/github-actions-dotnet-maui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fgithub-actions-dotnet-maui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fgithub-actions-dotnet-maui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fgithub-actions-dotnet-maui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fgithub-actions-dotnet-maui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsjdev-apps","download_url":"https://codeload.github.com/tsjdev-apps/github-actions-dotnet-maui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fgithub-actions-dotnet-maui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31823622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-15T02:31:24.179Z","updated_at":"2026-04-15T02:31:24.672Z","avatar_url":"https://github.com/tsjdev-apps.png","language":"C#","funding_links":["https://github.com/sponsors/tsjdev-apps"],"categories":[],"sub_categories":[],"readme":"# GitHub Actions for .NET MAUI\n\nThis repository shows how to build a .NET MAUI application in GitHub Actions for multiple target platforms. It contains a sample app and production-oriented workflow examples for Android, iOS, and Windows.\n\nThe goal is not just to compile the app, but to demonstrate the parts that usually matter in CI/CD for MAUI projects:\n\n- installing the .NET SDK from `global.json`\n- installing the MAUI workload on the runner\n- restoring NuGet packages\n- signing platform-specific packages with secrets\n- publishing deployable artifacts\n- uploading final build outputs for download and testing\n\nThe sample app under `src/MyAwesomeMauiApp` targets .NET 10 and is used to validate the workflows end to end.\n\n## Supported workflows\n\n| Platform | Runner | Target framework | Output |\n| --- | --- | --- | --- |\n| Android | `windows-latest` | `net10.0-android` | `.aab`, `.apk` |\n| iOS | `macos-26` | `net10.0-ios` | `.ipa` |\n| Windows | `windows-latest` | `net10.0-windows10.0.19041.0` | `.msix` |\n\nCurrent workflow files:\n\n- `.github/workflows/android-build.yml`\n- `.github/workflows/ios-build.yml`\n- `.github/workflows/windows-build.yml`\n\n## Repository layout\n\n- `src/MyAwesomeMauiApp`: sample .NET MAUI application used by the workflows\n- `.github/workflows`: GitHub Actions workflow definitions\n- `global.json`: pins the .NET SDK used locally and in CI\n- `NuGet.Config`: NuGet source configuration\n- `MyAwesomeMauiApp.slnx`: solution entry point\n\n## Project details\n\nThe sample app currently uses these MAUI target frameworks:\n\n- `net10.0-android`\n- `net10.0-ios`\n- `net10.0-maccatalyst`\n- `net10.0-windows10.0.19041.0` on Windows hosts\n\nThe SDK is pinned through `global.json` to `.NET SDK 10.0.200`, which keeps local and CI builds aligned.\n\n## What the workflows demonstrate\n\n### Android build\n\nThe Android workflow runs on `windows-latest` and publishes signed Android packages.\n\nMain steps:\n\n1. Check out the repository.\n2. Install the SDK version from `global.json`.\n3. Install the MAUI workload.\n4. Decode the Android keystore from a GitHub secret.\n5. Generate version metadata from the GitHub Actions run number.\n6. Restore NuGet packages.\n7. Publish the app for `net10.0-android` in `Release` mode.\n8. Collect `.aab` and `.apk` files into a flat output folder.\n9. Upload the final Android artifacts.\n\nThis workflow is useful as a baseline for signed Android CI builds where the final app packages should be ready for testing or store preparation.\n\n### iOS build\n\nThe iOS workflow runs on `macos-26` and produces an `.ipa` package.\n\nMain steps:\n\n1. Check out the repository.\n2. Install the SDK version from `global.json`.\n3. Select Xcode `26.2` explicitly.\n4. Install the MAUI workload.\n5. Import the signing certificate from GitHub Secrets.\n6. Download provisioning profiles from App Store Connect.\n7. Generate version metadata from the GitHub Actions run number.\n8. Restore NuGet packages.\n9. Publish the app for `net10.0-ios` in `Release` mode.\n10. Collect the generated `.ipa` file.\n11. Upload the iOS artifact.\n\nThis workflow shows the essential moving parts for iOS signing in CI: certificate import, provisioning profile download, and publishing a distributable package.\n\n### Windows build\n\nThe Windows workflow runs on `windows-latest` and produces a signed `.msix` package for testing and distribution.\n\nMain steps:\n\n1. Check out the repository.\n2. Install the SDK version from `global.json`.\n3. Install the MAUI workload.\n4. Restore NuGet packages.\n5. Decode a base64-encoded `.pfx` signing certificate from GitHub Secrets.\n6. Import the certificate into the current user certificate store.\n7. Validate that the certificate subject matches the publisher defined in `Platforms/Windows/Package.appxmanifest`.\n8. Export a public `.cer` certificate for installation on test machines.\n9. Publish the app for `net10.0-windows10.0.19041.0` as an MSIX package.\n10. Collect the generated `.msix` and helper files into an artifact folder.\n11. Upload the Windows build artifact.\n\nThe uploaded Windows artifact is designed for practical testing. It contains:\n\n- the app package as `.msix`\n- any required Windows App Runtime dependency package copied from the publish output\n- a public test certificate (`.cer`)\n- an `INSTALL.txt` file with installation notes\n\nThis makes the Windows workflow more useful than a simple compile-only job because a tester can install the package on another machine with minimal manual preparation.\n\n## Required GitHub Secrets\n\nThe workflows rely on platform-specific secrets for signing and distribution.\n\n### Android secrets\n\n- `ANDROID_KEYSTORE`: base64-encoded keystore file\n- `ANDROID_KEY_ALIAS`: alias inside the keystore\n- `ANDROID_KEY_PASSWORD`: key password\n- `ANDROID_KEYSTORE_PASSWORD`: keystore password\n\n### iOS secrets\n\n- `IOS_P12_BASE64`: base64-encoded `.p12` certificate\n- `IOS_P12_PASSWORD`: password for the `.p12` certificate\n- `IOS_BUNDLE_ID`: app bundle identifier\n- `APP_STORE_CONNECT_ISSUER_ID`: App Store Connect issuer ID\n- `APP_STORE_CONNECT_KEY_ID`: App Store Connect API key ID\n- `APP_STORE_CONNECT_PRIVATE_KEY`: App Store Connect private key content\n\n### Windows secrets\n\n- `PFX_BASE64`: base64-encoded `.pfx` certificate\n- `PFX_PASSWORD`: password for the `.pfx` certificate\n\nFor the Windows workflow, make sure the imported certificate subject matches the publisher configured in the app manifest. If those values differ, the workflow intentionally fails early.\n\n## Running the workflows\n\nAll three workflows currently use `workflow_dispatch`, so they can be triggered manually from the GitHub Actions tab.\n\nTypical execution flow:\n\n1. Open the repository in GitHub.\n2. Go to the Actions tab.\n3. Select the workflow you want to run.\n4. Start it with Run workflow.\n5. Download the uploaded artifact after the run completes.\n\n## Local build examples\n\nThe same project can also be built locally. Exact prerequisites depend on the target platform and host operating system.\n\nInstall workloads and restore packages:\n\n```powershell\ndotnet workload install maui\ndotnet restore src/MyAwesomeMauiApp/MyAwesomeMauiApp.csproj\n```\n\nBuild Android locally:\n\n```powershell\ndotnet publish src/MyAwesomeMauiApp/MyAwesomeMauiApp.csproj `\n    -f net10.0-android `\n    -c Release\n```\n\nBuild iOS locally on macOS:\n\n```bash\ndotnet publish src/MyAwesomeMauiApp/MyAwesomeMauiApp.csproj \\\n    -f net10.0-ios \\\n    -c Release\n```\n\nBuild Windows locally on Windows:\n\n```powershell\ndotnet publish src/MyAwesomeMauiApp/MyAwesomeMauiApp.csproj `\n    -f net10.0-windows10.0.19041.0 `\n    -c Release `\n    -p:RuntimeIdentifierOverride=win-x64 `\n    -p:WindowsPackageType=MSIX `\n    -p:AppxPackage=true\n```\n\nIf you want a signed Windows package locally, you also need a valid certificate whose publisher matches the Windows app manifest.\n\n## Why Windows needs special handling\n\nWindows packaging for MAUI is different from a basic desktop build. A useful CI workflow normally has to address these details:\n\n- package generation as MSIX instead of only compiling binaries\n- code signing with a trusted certificate\n- publisher validation between manifest and certificate\n- distribution of the public certificate for test environments\n- optional Windows App Runtime dependencies for machines that do not already have them\n\nThat is why the Windows workflow in this repository includes certificate import, publisher validation, MSIX packaging, and extra installation guidance in the artifact.\n\n## Next steps for this repository\n\nPossible future additions include:\n\n- automatic triggers on push and pull request\n- store submission or release workflows\n- notarization and distribution enhancements for Apple platforms\n- reusable workflows for MAUI repositories\n- matrix-based variants for Debug and Release builds\n\n## Summary\n\nThis repository now contains end-to-end GitHub Actions examples for the main .NET MAUI platform targets used in CI:\n\n- Android with signed `.aab` and `.apk` output\n- iOS with signed `.ipa` output\n- Windows with signed `.msix` output and test-installation assets\n\nThe Windows build is fully part of the documented setup and no longer missing from the project overview.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjdev-apps%2Fgithub-actions-dotnet-maui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsjdev-apps%2Fgithub-actions-dotnet-maui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjdev-apps%2Fgithub-actions-dotnet-maui/lists"}