diff --git a/.github/workflows/eas-cloud.yml b/.github/workflows/eas-cloud.yml index f89e065b5..23c6880c2 100644 --- a/.github/workflows/eas-cloud.yml +++ b/.github/workflows/eas-cloud.yml @@ -1,11 +1,11 @@ -# Native production pipeline +# Native production pipeline # Builds on EAS Cloud with auto submission name: EAS Build & Submit on: - workflow_dispatch: + workflow_dispatch: push: - branches: + branches: - main paths: - 'packages/app/**' @@ -35,6 +35,15 @@ jobs: working-directory: ${{ github.workspace }}/apps/expo run: echo "$(jq '.submit.production.ios.ascAppId = "${{ secrets.ASC_APP_ID }}"' eas.json)" > eas.json + - name: Get Build Version + working-directory: ./apps/expo + shell: bash + run: | + MAJOR_MINOR_VERSIONS=$(jq -r '.expo.version' app.json) + PATCH_VERSION=${{ github.run_number }} + APP_VERSION="${MAJOR_MINOR_VERSIONS%.*}.$PATCH_VERSION" + jq --arg version "$APP_VERSION" '.expo.version = $version' app.json > app.json.temp && mv app.json.temp app.json + - name: Build on EAS working-directory: ./apps/expo - run: eas build --platform all --profile production --non-interactive --no-wait --auto-submit + run: eas build --platform all --profile production --non-interactive --no-wait --auto-submit \ No newline at end of file diff --git a/apps/expo/eas.json b/apps/expo/eas.json index a3b2fe236..587d52750 100644 --- a/apps/expo/eas.json +++ b/apps/expo/eas.json @@ -16,6 +16,7 @@ } }, "preview": { + "autoIncrement": true, "distribution": "internal", "ios": { "resourceClass": "m-medium"