Skip to content

Test .NET MAUI iOS App #4

Test .NET MAUI iOS App

Test .NET MAUI iOS App #4

Workflow file for this run

name: Test .NET MAUI iOS App
on:
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup .NET MAUI
run: dotnet workload install maui
# Setup signing certs & profiles
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.P12_FILE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Download Apple Provisioning Profiles
uses: Apple-Actions/download-provisioning-profiles@v1
with:
bundle-id: 'com.companyname.mauiuitestsample'
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
- name: Restore dependencies
run: dotnet restore
- name: Build .NET MAUI App
run: dotnet publish MauiUITestSample/MauiUITestSample.csproj -c Release -f net7.0-ios -o ${{ github.workspace }}/artifacts/
- name: Build UITest Project
run: dotnet build MyAppTests/MyAppTests.csproj -c Debug
- name: Install App Center CLI
run: npm install --location=global appcenter-cli
- name: Upload App to Test Cloud
# Upload token - you can get one from appcenter.ms/settings
run: "appcenter test run uitest --app \"xtc-Xamarin-Forms/MauiTest-iOS\" --devices 1f1515d2 --app-path \"${{ github.workspace }}/artifacts/MauiUITestSample.ipa\" --test-series \"master\" --locale \"en_US\" --build-dir \"MyAppTests/bin/Debug/net48/\" --uitest-tools-dir \"MyAppTests/bin/Debug/net48/\" --token \"${{ secrets.APPCENTER_TOKEN_IOS }}\""