Created
July 5, 2023 07:48
-
-
Save trnktms/ea7cca53e117c2cce28014c2d9ae8287 to your computer and use it in GitHub Desktop.
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
trigger: | |
- main | |
variables: | |
DotNetVersion: 6.0.x | |
stages: | |
# iOS | |
- stage: BuildiOS | |
dependsOn: '' | |
displayName: Build iOS | |
jobs: | |
- job: BuildMAUIApps | |
displayName: Build app | |
pool: | |
vmImage: 'macos-latest' | |
demands: 'xcode' | |
steps: | |
- task: UseDotNet@2 | |
displayName: Use .NET version | |
inputs: | |
packageType: 'sdk' | |
version: '$(DotNetVersion)' | |
- task: CmdLine@2 | |
displayName: Install MAUI | |
inputs: | |
script: 'dotnet workload install maui' | |
- task: InstallAppleCertificate@2 | |
displayName: Install Apple Certificate | |
inputs: | |
certSecureFile: 'development.p12' | |
certPwd: '' | |
keychain: 'temp' | |
- task: InstallAppleProvisioningProfile@1 | |
displayName: Install Apple Provisioning Profile | |
inputs: | |
provisioningProfileLocation: 'sourceRepository' | |
provProfileSourceRepository: 'MyApplication.mobileprovision' | |
- task: Bash@3 | |
displayName: Restore nuget | |
inputs: | |
targetType: 'inline' | |
script: | | |
cd src | |
dotnet restore MyApplication.Mobile.sln | |
- task: Bash@3 | |
displayName: Publish iOS app | |
inputs: | |
targetType: 'inline' | |
script: | | |
cd src | |
dotnet publish -f net6.0-ios -c Release -p:ArchiveOnBuild=true -p:EnableAssemblyILStripping=false -p:Environment=$ENVIRONMENT | |
env: | |
ENVIRONMENT: $(Environment) | |
- task: CopyFiles@2 | |
displayName: Copy artifacts | |
inputs: | |
SourceFolder: '$(agent.builddirectory)' | |
Contents: | | |
**/*.ipa | |
TargetFolder: '$(build.artifactstagingdirectory)' | |
flattenFolders: true | |
- task: PublishBuildArtifacts@1 | |
displayName: Publish artifacts | |
inputs: | |
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | |
ArtifactName: 'drop-ios' | |
publishLocation: 'Container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment