diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 9413736a..8594088d 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -92,5 +92,6 @@ jobs: eas update --branch="${{ github.event.deployment_status.environment_url }}" --non-interactive --auto echo "${{ env.BACKEND_SERVER_URL }} and ${{ github.event.deployment_status.environment_url }}" env: + # TODO: Is SENTRY_PROJECT_NAME and SENTRY_DSN needed here? EXPO_PUBLIC_BACKEND_SERVER_URL: "${{ github.event.deployment_status.environment_url }}" EXPO_PUBLIC_ROLLBAR_ACCESS_TOKEN: "1a19e5da05b2435b802d5a81aba2bbd7" diff --git a/{{cookiecutter.project_slug}}/.github/workflows/expo-build.yml b/{{cookiecutter.project_slug}}/.github/workflows/expo-build.yml index b7e913b7..414d6641 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/expo-build.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/expo-build.yml @@ -31,6 +31,19 @@ on: default: false type: "boolean" jobs: + setup: + runs-on: ubuntu-latest + steps: + - uses: jwalton/gh-find-current-pr@v1 + id: findPr + - name: Set name for PR + if: success() && steps.findPr.outputs.number + run: echo "PR=pr-${PR}" >> $GITHUB_ENV + env: + PR: {{ "${{ steps.findPr.outputs.pr }}" }} + outputs: + PR: {{ "${{ env.PR }}" }} + build: runs-on: ubuntu-latest @@ -64,3 +77,11 @@ jobs: CLEAR_CACHE_FLAG="--clear-cache" fi eas build --profile {{ "${{ github.event.inputs.profile }}" }} --platform {{ "${{ github.event.inputs.platform }}" }} --non-interactive $CLEAR_CACHE_FLAG + + - name: 🚀 Publish PR Preview + run: cd mobile && eas update --branch={{ "${{ needs.setup.outputs.PR }}" }} --non-interactive --auto + env: + BACKEND_SERVER_URL: {{ "${{ github.event.deployment_status.environment_url }}" }} + ROLLBAR_ACCESS_TOKEN: "" + SENTRY_PROJECT_NAME: "" + SENTRY_DSN: "" diff --git a/{{cookiecutter.project_slug}}/.github/workflows/expo-emergency-prod-update.yml b/{{cookiecutter.project_slug}}/.github/workflows/expo-emergency-prod-update.yml index 5b31d6b0..9f8c77a4 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/expo-emergency-prod-update.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/expo-emergency-prod-update.yml @@ -33,3 +33,9 @@ jobs: - name: 🚀 Publish preview run: cd mobile && eas update --branch=production --non-interactive --auto + env: + # Since expo update replaces code OTA these variables should match the environment variables in eas.json + EXPO_PUBLIC_BACKEND_SERVER_URL: "" + EXPO_PUBLIC_ROLLBAR_ACCESS_TOKEN: "" + SENTRY_PROJECT_NAME: "" + SENTRY_DSN": "" diff --git a/{{cookiecutter.project_slug}}/.github/workflows/expo-main.yml b/{{cookiecutter.project_slug}}/.github/workflows/expo-main.yml index 2f9c9836..186768ea 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/expo-main.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/expo-main.yml @@ -9,7 +9,8 @@ jobs: setup: runs-on: ubuntu-latest outputs: - BUILD_MOBILE_APP: {{ "${{ steps.checkdiff.outputs.BUILD_MOBILE_APP }}" }} + BUILD_MOBILE_APP: + {{ "${{ steps.checkdiff.outputs.BUILD_MOBILE_APP }}" }} steps: - uses: actions/checkout@v4 with: @@ -64,14 +65,14 @@ jobs: - name: 🚀 Build app run: cd mobile && eas build --platform all --profile staging --non-interactive - env: - SENTRY_PROJECT_NAME: "" + env: + SENTRY_PROJECT_NAME: "" - name: 🚀 Publish Staging Preview run: cd mobile && eas update --branch=staging --non-interactive --auto env: - # Since expo update replaces code OTA these variables should match the staging variables in eas.json + # Since expo update replaces code OTA these variables should match the staging variables in eas.json EXPO_PUBLIC_BACKEND_SERVER_URL: "" EXPO_PUBLIC_ROLLBAR_ACCESS_TOKEN: "" - - + SENTRY_PROJECT_NAME: "" + SENTRY_DSN: "" diff --git a/{{cookiecutter.project_slug}}/.github/workflows/expo-pr.yml b/{{cookiecutter.project_slug}}/.github/workflows/expo-pr.yml index 0e7f0a6b..da118ea5 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/expo-pr.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/expo-pr.yml @@ -50,3 +50,5 @@ jobs: env: EXPO_PUBLIC_BACKEND_SERVER_URL: {{ "${{ github.event.deployment_status.environment_url }}" }} EXPO_PUBLIC_ROLLBAR_ACCESS_TOKEN: "" + SENTRY_PROJECT_NAME: "" + SENTRY_DSN: "" \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-android.yml b/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-android.yml index f99c5e7d..d2a20dd3 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-android.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-android.yml @@ -24,7 +24,7 @@ jobs: with: expo-version: latest eas-version: latest - token: {{ "${{ secrets.EXPO_TOKEN }}" }} + token: {{ "${{ secrets.EXPO_TOKEN }}" }} - name: 📦 Install dependencies working-directory: ./mobile @@ -32,5 +32,5 @@ jobs: - name: 🚀 Build app run: cd mobile && eas build --platform android --profile production --non-interactive --auto-submit - env: - SENTRY_PROJECT_NAME: "" + env: + SENTRY_PROJECT_NAME: "" diff --git a/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-ios.yml b/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-ios.yml index 85f95424..ec24ee70 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-ios.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/expo-teststore-build-ios.yml @@ -24,7 +24,7 @@ jobs: with: expo-version: latest eas-version: latest - token: {{ "${{ secrets.EXPO_TOKEN }}" }} + token: {{ "${{ secrets.EXPO_TOKEN }}" }} - name: 📦 Install dependencies working-directory: ./mobile @@ -32,5 +32,5 @@ jobs: - name: 🚀 Build app run: cd mobile && eas build --platform ios --profile production --non-interactive --auto-submit - env: - SENTRY_PROJECT_NAME: "" + env: + SENTRY_PROJECT_NAME: ""