From f68cbc92159e7600797cb3f9ef744e12f0c9608c Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Mon, 9 Sep 2024 12:09:00 +0700 Subject: [PATCH] Don't build iOS if not on the opengisch/QField repo --- .github/workflows/ios.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 363f1c2f03..9035ee1532 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -29,10 +29,12 @@ jobs: steps: - name: 🐣 Checkout uses: actions/checkout@v4 + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: submodules: recursive - name: Reclaim disk space + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} run: | rm -rf /Applications/Xcode_14* rm -rf /Applications/Xcode_16* @@ -40,6 +42,7 @@ jobs: - name: 🌾 Prepare variables id: vars + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} run: | ./scripts/ci/env_gh.sh @@ -51,6 +54,7 @@ jobs: - name: 💎 Setup ruby uses: ruby/setup-ruby@v1 + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: ruby-version: '3.2' # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically @@ -64,6 +68,7 @@ jobs: - name: 🍹 Prepare ios build env + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} run: | # Workaround GitHub Actions Python issues brew unlink python && brew link --overwrite python @@ -77,26 +82,31 @@ jobs: - name: 🐩 Install CMake and Ninja uses: lukka/get-cmake@latest + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: cmakeVersion: 3.29.0 - name: 🐍 Setup Python uses: actions/setup-python@v5 + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: python-version: '3.11' - name: 🍭 Setup XCode uses: maxim-lobanov/setup-xcode@v1.6.0 + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: xcode-version: latest-stable - name: 🍮 ccache uses: hendrikmuhs/ccache-action@v1.2.11 + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: key: ccache-ios max-size: 200M - name: 🌱 Install dependencies and generate project files + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} run: | source ./scripts/version_number.sh source ./scripts/ci/generate-version-details.sh @@ -142,6 +152,7 @@ jobs: /Users/runner/builddir/**/*.log - name: 📦 Package + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} run: | cmake --build /Users/runner/builddir --target bundle --config Release @@ -157,6 +168,7 @@ jobs: - name: 📤 Upload qfield Ipa uses: actions/upload-artifact@v4 + if: ${{ env.SENTRY_AUTH_TOKEN != '' }} with: name: qfield-${{ env.TRIPLET }}-${{ env.DEPLOYMENT_TARGET }}.ipa path: /Users/runner/builddir/qfieldIpa/QField.ipa