From 0e41945a8a7c2a79fecb56472ad16a0fb1886e46 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 9 Jun 2020 10:47:09 -0400 Subject: [PATCH] build ios --- .github/scripts/ios/build.ps1 | 14 ++++++++++++++ .github/scripts/ios/decrypt-secrets.ps1 | 4 ++++ .github/workflows/build.yml | 12 ++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/scripts/ios/build.ps1 create mode 100644 .github/scripts/ios/decrypt-secrets.ps1 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