diff --git a/.github/scripts/ios/build.ps1 b/.github/scripts/ios/build.ps1 new file mode 100644 index 000000000..437c5d969 --- /dev/null +++ b/.github/scripts/ios/build.ps1 @@ -0,0 +1,14 @@ +param ( + [Parameter(Mandatory=$true)] + [string] $configuration, + [string] $platform = "iPhone" +) + +$rootPath = $env:GITHUB_WORKSPACE; +$iosPath = $($rootPath + "\src\iOS\iOS.csproj"); + +Write-Output "########################################" +Write-Output "##### Build $configuration Configuration for $platform Platform" +Write-Output "########################################" + +msbuild "$($iosPath)" "/p:Platform=$platform" "/p:Configuration=$configuration" diff --git a/.github/scripts/ios/decrypt-secrets.ps1 b/.github/scripts/ios/decrypt-secrets.ps1 new file mode 100644 index 000000000..3ef489542 --- /dev/null +++ b/.github/scripts/ios/decrypt-secrets.ps1 @@ -0,0 +1,4 @@ +$rootPath = $env:GITHUB_WORKSPACE; + +$decryptSecretPath = $($rootPath + ".\.github\scripts\decrypt-secret.ps1"); + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3a64104f..4c52bbbe1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,8 +118,16 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 + - name: Decrypt secrets + if: github.ref == 'refs/heads/master' + run: ./.github/scripts/ios/decrypt-secrets.ps1 + shell: pwsh + env: + DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }} + - name: Restore packages run: nuget restore - - name: Build app - run: msbuild ./src/iOS/iOS.csproj /verbosity:normal /p:Platform=iPhone /p:Configuration=Debug + - name: Build for App Store + run: ./.github/scripts/android/build.ps1 -configuration AppStore -platform iPhone + shell: pwsh