create-disposabl-app 0.20.16 → 0.20.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +3 -1
  3. package/dist/templates/default/.github/scripts/apple.sh +9 -0
  4. package/dist/templates/default/.github/scripts/release.sh +11 -1
  5. package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
  6. package/dist/templates/default/apps/docs/content/mobile.mdx +2 -0
  7. package/dist/templates/default/apps/docs/content/publishing/apple.mdx +12 -0
  8. package/dist/templates/default/apps/docs/content/publishing/google-play.mdx +12 -0
  9. package/dist/templates/default/apps/docs/content/publishing/index.mdx +23 -0
  10. package/dist/templates/default/apps/mobile/eas.json +2 -0
  11. package/dist/templates/default/apps/mobile/package.json +15 -14
  12. package/dist/templates/default/apps/mobile/scripts/android-release-verify.mjs +62 -7
  13. package/dist/templates/default/apps/mobile/scripts/play-aab.mjs +4 -0
  14. package/dist/templates/default/apps/mobile/scripts/verify-play-aab.mjs +48 -0
  15. package/dist/templates/default/bun.lock +111 -169
  16. package/dist/templates/default/disposabl.json +1 -1
  17. package/dist/templates/default/package.json +6 -6
  18. package/dist/templates/default/packages/backend/convex/authEmail.ts +1 -1
  19. package/dist/templates/default/packages/backend/convex/convex.config.ts +1 -0
  20. package/dist/templates/default/packages/backend/convex/users/internal.ts +13 -16
  21. package/dist/templates/default/packages/disposabl-kit/PAYMENTS.md +8 -0
  22. package/dist/templates/default/packages/disposabl-kit/client/components/cookie-consent.tsx +117 -0
  23. package/dist/templates/default/packages/disposabl-kit/client/components/google-sign-in.tsx +0 -2
  24. package/dist/templates/default/packages/disposabl-kit/client/components/legal-page.tsx +19 -1
  25. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/verify-email.tsx +4 -2
  26. package/dist/templates/default/packages/disposabl-kit/client/routes/pricing.tsx +18 -4
  27. package/dist/templates/default/packages/disposabl-kit/client/styles/cookie-consent.css +54 -0
  28. package/dist/templates/default/packages/disposabl-kit/legal/config.ts +10 -7
  29. package/dist/templates/default/packages/disposabl-kit/legal/documents/privacy.ts +3 -1
  30. package/dist/templates/default/packages/disposabl-kit/legal/index.ts +2 -1
  31. package/dist/templates/default/packages/disposabl-kit/legal/publisher.ts +5 -1
  32. package/dist/templates/default/packages/disposabl-kit/legal/types.ts +18 -0
  33. package/dist/templates/default/packages/disposabl-kit/lib/auth-errors.ts +2 -0
  34. package/dist/templates/default/packages/disposabl-kit/mobile/billing/account-billing.tsx +168 -99
  35. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +9 -21
  36. package/dist/templates/default/packages/disposabl-kit/mobile/components/email-verification.tsx +4 -2
  37. package/dist/templates/default/packages/disposabl-kit/mobile/components/settings-page.tsx +52 -20
  38. package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +13 -4
  39. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-errors.ts +2 -0
  40. package/dist/templates/default/packages/disposabl-kit/package.json +14 -9
  41. package/dist/templates/default/packages/disposabl-kit/payments/catalog.ts +6 -0
  42. package/dist/templates/default/packages/disposabl-kit/payments/config.ts +5 -3
  43. package/dist/templates/default/packages/disposabl-kit/server/billing-functions.ts +15 -3
  44. package/dist/templates/default/packages/disposabl-kit/server/billing-native-capability.ts +33 -6
  45. package/dist/templates/default/packages/disposabl-kit/server/billing.ts +11 -3
  46. package/dist/templates/default/packages/disposabl-kit/server/revenuecat-contract.ts +87 -8
  47. package/dist/templates/default/packages/disposabl-kit/server/revenuecat-functions.ts +34 -8
  48. package/dist/templates/default/packages/disposabl-kit/server/revenuecat-validator.ts +3 -0
  49. package/dist/templates/default/packages/tests/billing-setup.test.ts +14 -14
  50. package/dist/templates/default/packages/tests/billing.test.ts +22 -0
  51. package/dist/templates/default/packages/tests/components/mobile-account-billing.test.mjs +149 -0
  52. package/dist/templates/default/packages/tests/flows/email-delivery.e2e.ts +1 -1
  53. package/dist/templates/default/packages/tests/flows/legal.e2e.ts +7 -5
  54. package/dist/templates/default/packages/tests/flows/password-backend.e2e.ts +1 -1
  55. package/dist/templates/default/packages/tests/helpers/auth-email-setup/probe.test.mjs +1 -1
  56. package/dist/templates/default/packages/tests/ios-ota.test.ts +32 -10
  57. package/dist/templates/default/packages/tests/mobile-account-billing.test.ts +19 -0
  58. package/dist/templates/default/packages/tests/native-billing.test.ts +71 -0
  59. package/dist/templates/default/packages/tests/package-release.test.ts +16 -0
  60. package/dist/templates/default/packages/tests/revenuecat-inbox.test.ts +91 -3
  61. package/dist/templates/default/patches/expo-modules-core@58.1.0.patch +23 -0
  62. package/dist/templates/default/vendor/README.md +4 -10
  63. package/dist/templates/default/vendor/convex-auth-2.0.0-disposabl.2.patch +2096 -0
  64. package/dist/templates/default/vendor/convex-auth-2.0.0-disposabl.2.tgz +0 -0
  65. package/package.json +1 -1
package/dist/disposabl.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // ../cli/auth.ts
4
4
  import { lock } from "proper-lockfile";
5
5
  // ../cli/package.json
6
- var version = "0.20.16";
6
+ var version = "0.20.18";
7
7
  var package_default = {
8
8
  name: "@disposabl/cli",
9
9
  version,
package/dist/index.js CHANGED
@@ -1563,7 +1563,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
1563
1563
  import { Command, CommanderError } from "commander";
1564
1564
  import * as p2 from "@clack/prompts";
1565
1565
  // package.json
1566
- var version = "0.20.16";
1566
+ var version = "0.20.18";
1567
1567
 
1568
1568
  // ../cli/telemetry.ts
1569
1569
  var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
@@ -9139,6 +9139,8 @@ import { join as join3, sep } from "node:path";
9139
9139
  var nativeBillingPath = join3("packages", "disposabl-kit", "mobile", "billing") + sep;
9140
9140
  var nativeBillingTests = [
9141
9141
  join3("packages", "tests", "native-billing.test.ts"),
9142
+ join3("packages", "tests", "mobile-account-billing.test.ts"),
9143
+ join3("packages", "tests", "components", "mobile-account-billing.test.mjs"),
9142
9144
  join3("packages", "tests", "mobile-storefront-observer.test.ts"),
9143
9145
  join3("packages", "tests", "components", "mobile-storefront-observer.test.mjs")
9144
9146
  ];
@@ -3,8 +3,15 @@ set -euo pipefail
3
3
  report() { node "$GITHUB_WORKSPACE/.github/scripts/disposabl.mjs" report ios "$@"; }
4
4
  check_source() { test "$(gh api "repos/$GH_REPO/$SOURCE_PATH" --jq 'if has("head") then (if .state == "open" then .head.sha else "closed" end) else .object.sha end')" = "$SOURCE"; }
5
5
  runtime() { bun x --no-install expo-updates runtimeversion:resolve --platform ios --workflow managed | jq -er 'select(.fingerprintSources != null) | .runtimeVersion | select(test("^[a-f0-9]{40,64}$"))'; }
6
+ product_payments() {
7
+ [[ "${GH_REPO:-}" == disposabl-dev/create-disposabl-app ]] || return 0
8
+ for name in EXPO_PUBLIC_REVENUECAT_IOS_API_KEY EXPO_PUBLIC_REVENUECAT_IOS_MONTHLY_PRODUCT EXPO_PUBLIC_REVENUECAT_IOS_APP_ID EXPO_PUBLIC_REVENUECAT_IOS_TOPUP_PRODUCT; do
9
+ [[ "${!name:-}" =~ [^[:space:]] ]] || { echo "Missing $name" >&2; return 1; }
10
+ done
11
+ }
6
12
  case "${1:?operation required}" in
7
13
  ota-plan)
14
+ product_payments
8
15
  check_source
9
16
  RUNTIME=$(runtime)
10
17
  identifier=$(bun x --no-install expo config --json | jq -er --arg project "$EXPO_PROJECT_ID" 'select(.extra.eas.projectId == $project) | .ios.bundleIdentifier | select(type == "string" and length > 0)')
@@ -36,6 +43,7 @@ case "${1:?operation required}" in
36
43
  echo "Published iOS OTA to $CHANNEL for runtime $expected. Compatible installed apps download it on launch or after a long inactive interval." >> "$GITHUB_STEP_SUMMARY"
37
44
  ;;
38
45
  deliver)
46
+ product_payments
39
47
  # A successful build may never have been submitted. Recover delivery without
40
48
  # building another identical binary or duplicating a queued submission.
41
49
  : "${BUILD_ID:?Matching iOS build required}"
@@ -87,6 +95,7 @@ case "${1:?operation required}" in
87
95
  echo 'ready=true' >> "$GITHUB_OUTPUT"
88
96
  ;;
89
97
  production)
98
+ product_payments
90
99
  report building
91
100
  jq --arg channel "$CHANNEL" --arg number "$DISPOSABL_IOS_BUILD_NUMBER" \
92
101
  --arg url "$CONVEX_URL" --arg site "$CONVEX_SITE_URL" \
@@ -16,7 +16,17 @@ if GITHUB_TOKEN="$GH_TOKEN" npm_config_workspaces_update=false bun run --cwd "pa
16
16
  # case, but never require a public version before attempting OIDC publication.
17
17
  published="$name@$version"
18
18
  [[ "$version" != *development* ]] || published=$name
19
- if ! PUBLISHED_VERSION=$(npm view "$published" version); then
19
+ # npm scans newly published packages before they become visible. Retry a
20
+ # bounded number of times, but never report ready without registry proof.
21
+ available=false
22
+ for attempt in {1..12}; do
23
+ if PUBLISHED_VERSION=$(npm view "$published" version --fetch-retries=0 --fetch-timeout=10000); then
24
+ available=true
25
+ break
26
+ fi
27
+ if (( attempt < 12 )); then sleep 10; fi
28
+ done
29
+ if [[ "$available" != true ]]; then
20
30
  node .github/scripts/disposabl.mjs report "$platform" failed 'Release finished, but npm availability could not be verified; check the registry lookup error.'
21
31
  exit 1
22
32
  fi
@@ -1 +1 @@
1
- {name: Pipeline,"on": {pull_request: {branches: [main]},push: {branches: [main]}},permissions: {contents: read,pull-requests: read},concurrency: {group: "${{ github.workflow }}-${{ github.ref }}",cancel-in-progress: "${{ github.event_name == 'pull_request' }}"},env: {CHANNEL: "${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}",DISPOSABL_MOBILE_CHANNEL: "${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}",EAS_ENVIRONMENT: "${{ github.event_name == 'push' && 'production' || 'preview' }}",EAS_CLI: eas-cli@27.2.0,BUN_VERSION: 1.4.4,NODE_VERSION: "24",LINUX_RUNNER: ubuntu-24.04,WEB_RUNNER: ubuntu-24.04,WINDOWS_RUNNER: windows-2025,MACOS_RUNNER: macos-26,RELEASE_PREFIX: app,DISPOSABL_ANDROID_VERSION_CODE: "${{ github.run_number }}",DISPOSABL_IOS_BUILD_NUMBER: "${{ github.run_number }}",GH_TOKEN: "${{ github.token }}",GH_REPO: "${{ github.repository }}",SOURCE: "${{ github.event.pull_request.head.sha || github.sha }}",SOURCE_PATH: "${{ github.event_name == 'pull_request' && format('pulls/{0}', github.event.number) || 'git/ref/heads/main' }}",DISPOSABL_RELEASE_VERSION: "1.0.${{ github.run_number }}"},jobs: {changes: {name: Select work,if: "github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository",permissions: {contents: read,pull-requests: read,actions: read},runs-on: ubuntu-24.04,timeout-minutes: 30,outputs: {linux_runner: "${{ steps.platforms.outputs.linux_runner }}",android_runner: "${{ steps.platforms.outputs.android_runner }}",macos_runner: "${{ steps.platforms.outputs.macos_runner }}",changed: "${{ steps.platforms.outputs.changed }}",android: "${{ steps.platforms.outputs.android }}",ios: "${{ steps.platforms.outputs.ios }}",desktop: "${{ steps.platforms.outputs.desktop }}",packages: "${{ steps.platforms.outputs.packages }}"},steps: [&item0 {uses: actions/checkout@v6,with: {ref: "${{ env.SOURCE }}",persist-credentials: false}},{name: Select affected platforms,shell: bash,id: platforms,env: {PR: "${{ github.event.number }}",EXPO_CONNECTED: "${{ secrets.EXPO_TOKEN != '' }}",IOS_BUILDS_ENABLED: "${{ vars.IOS_BUILDS_ENABLED != 'false' }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/platforms.sh\""}]},web: {name: Web,needs: changes,if: "needs.changes.outputs.changed == 'true'",permissions: &permissions {contents: read,pull-requests: read,id-token: write},timeout-minutes: 20,runs-on: "${{ needs.changes.outputs.linux_runner }}",outputs: {desktop: "${{ needs.changes.outputs.desktop }}",ios: "${{ needs.changes.outputs.ios }}",packages: "${{ needs.changes.outputs.packages }}",release: "${{ steps.artifacts.outcome == 'success' }}",android_build: "${{ steps.fingerprint.outputs.build }}",android_runtime: "${{ steps.fingerprint.outputs.runtime }}",convex_url: "${{ steps.deploy.outputs.CONVEX_URL }}",convex_site_url: "${{ steps.deploy.outputs.CONVEX_SITE_URL }}"},env: {PLATFORM: android,DISPOSABL_ANDROID_SIGNING: "${{ github.event_name == 'push' && secrets.DISPOSABL_ANDROID_SIGNING || '' }}",ANDROID_KEYSTORE_BASE64: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}",ANDROID_KEYSTORE_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}",ANDROID_KEY_ALIAS: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}",ANDROID_KEY_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}",ANDROID_PLAY_SUBMIT: "${{ vars.ANDROID_PLAY_SUBMIT }}",EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1"},steps: [*item0,&item1 {uses: actions/setup-node@v6,with: {node-version: "24",package-manager-cache: false}},&item2 {uses: oven-sh/setup-bun@v2,with: {bun-version: 1.4.4}},&item3 {uses: actions/cache@v4,with: {path: ~/.bun/install/cache,key: "bun-${{ github.job == 'desktop' && 'desktop-' || '' }}${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}-${{ hashFiles('bun.lock') }}",restore-keys: "bun-${{ github.job == 'desktop' && 'desktop-' || '' }}${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}-"}},&item4 {run: "bun install --frozen-lockfile ${{ github.job == 'desktop' && '--filter \"*desktop*\" --filter @disposabl/backend' || (github.job == 'android' || startsWith(github.job, 'ios-')) && '--filter @disposabl/mobile' || '' }}"},{name: Report build start,run: "node .github/scripts/disposabl.mjs report web,api,mcp building\nif [[ -z \"$EXPO_TOKEN\" ]]; then node .github/scripts/disposabl.mjs report android blocked 'Connect Expo before building Android.'; fi\nif [[ '${{ github.event_name }}' == pull_request ]]; then node .github/scripts/disposabl.mjs report cli,typescript-sdk blocked 'Packages publish after merge to main.'; fi\n"},{name: Check,run: bun run check},{name: Build selected clients,run: "for package in cli sdk; do\n if test -f \"packages/$package/package.json\"; then bun run --cwd \"packages/$package\" build; fi\ndone\n"},{name: Deploy,id: deploy,timeout-minutes: 10,env: {TRUSTED: "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}",CONVEX_DEPLOY_KEY: "${{ secrets[github.event_name == 'push' && 'CONVEX_DEPLOY_KEY' || 'CONVEX_DEPLOY_KEY_PREVIEW'] }}"},run: "if [[ \"$TRUSTED\" != true ]]; then VITE_CONVEX_URL=https://ci.invalid VITE_CONVEX_SITE_URL=https://ci.invalid bun run build --filter=@disposabl/web; exit; fi\n: \"${CONVEX_DEPLOY_KEY:?Configure the Convex deployment secret for this repository}\"\ncd packages/backend\nexport AUTH_TARGET=--prod\ntarget=()\nif [[ \"$CHANNEL\" != production ]]; then export AUTH_TARGET=\"--preview-name $CHANNEL\"; target=(--preview-name \"$CHANNEL\"); fi\nbun x --no-install convex deploy --yes \"${target[@]}\" --cmd-url-env-var-name CONVEX_URL --cmd 'for name in CONVEX_URL CONVEX_SITE_URL; do value=$(printenv \"$name\"); test -n \"$value\" || exit 1; for prefix in \"\" VITE_ EXPO_PUBLIC_; do export \"$prefix$name=$value\"; printf \"%s=%s\\n\" \"$prefix$name\" \"$value\" | tee -a \"$GITHUB_ENV\" >> \"$GITHUB_OUTPUT\"; done; done; bun run --cwd ../.. build --filter=@disposabl/web'\nsetup_target=(--prod)\nif [[ \"$CHANNEL\" != production ]]; then setup_target=(\"${target[@]}\"); fi\nbun x --no-install convex run \"${setup_target[@]}\" billing:setup '{}'\nbun x --no-install static-hosting upload $AUTH_TARGET --no-spa --dist ../../apps/web/dist/client\n"},{name: Report web result,if: always(),run: "node .github/scripts/disposabl.mjs report web,api,mcp ${{ steps.deploy.outcome == 'success' && 'ready' || 'failed' }}"},{name: Expo,if: "needs.changes.outputs.android == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Channel,if: "needs.changes.outputs.android == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-channel"},{name: Fingerprint,id: fingerprint,if: "needs.changes.outputs.android == 'true'",env: {},working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-fingerprint"},{name: Update,if: "steps.fingerprint.outputs.build == 'false'",env: {TAG: "${{ steps.fingerprint.outputs.tag }}",SHA: "${{ steps.fingerprint.outputs.sha }}",RUNTIME: "${{ steps.fingerprint.outputs.runtime }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-update"},&item5 {name: Publish,if: "github.job == 'android' || (github.job == 'web' && hashFiles('dist/release/android.json') != '') || github.job == 'desktop'",shell: bash,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/release.sh\" verify-artifacts"},&item6 {name: Upload release artifacts,id: artifacts,if: "hashFiles('dist/release/*') != ''",uses: actions/upload-artifact@v4,with: {name: "release-${{ env.PLATFORM }}",path: dist/release/,retention-days: 3,compression-level: 0,if-no-files-found: error}}]},android: {name: Android,needs: [changes,web],if: "needs.web.outputs.android_build == 'true'",permissions: *permissions,runs-on: "${{ needs.changes.outputs.android_runner }}",timeout-minutes: 30,env: {PLATFORM: android,EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1",CONVEX_URL: "${{ needs.web.outputs.convex_url }}",CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PUBLIC_CONVEX_URL: "${{ needs.web.outputs.convex_url }}",EXPO_PUBLIC_CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}"},steps: [*item0,{name: Prepare Android disk space,run: bash .github/scripts/android-runner.sh prepare},*item1,*item2,*item3,*item4,{name: Report mobile build,run: "node .github/scripts/disposabl.mjs report \"$PLATFORM\" building"},{name: Expo,working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Java,uses: actions/setup-java@v5,with: {distribution: temurin,java-version: "17"}},{name: SDK,uses: android-actions/setup-android@v3,with: {packages: platform-tools}},{name: Gradle,uses: gradle/actions/setup-gradle@v4,with: {cache-read-only: false}},{name: Restore native compiler cache,if: "github.event_name == 'push'",id: native-cache,uses: actions/cache/restore@v4,with: {path: "${{ runner.temp }}/ccache",key: "android-ccache-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}"}},{name: Install native compiler cache,if: "github.event_name == 'push' && steps.native-cache.outputs.cache-hit == 'true'",run: "sudo apt-get update -qq\nsudo apt-get install -y ccache\nprintf 'CCACHE_DIR=%s\\nCCACHE_COMPILERCHECK=content\\nCMAKE_C_COMPILER_LAUNCHER=ccache\\nCMAKE_CXX_COMPILER_LAUNCHER=ccache\\n' \"$RUNNER_TEMP/ccache\" >> \"$GITHUB_ENV\"\n"},{name: Select Android bundle validation,id: bundletool-needed,env: {SIGNING_BUNDLE: "${{ github.event_name == 'push' && secrets.DISPOSABL_ANDROID_SIGNING || '' }}",SIGNING_STORE: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}",SIGNING_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}",SIGNING_ALIAS: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}",SIGNING_KEY_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}"},run: "if [[ -n \"$SIGNING_BUNDLE$SIGNING_STORE$SIGNING_PASSWORD$SIGNING_ALIAS$SIGNING_KEY_PASSWORD\" ]]; then echo 'needed=true' >> \"$GITHUB_OUTPUT\"; fi\n"},{name: Download verified bundletool,if: "steps.bundletool-needed.outputs.needed == 'true'",run: "curl --fail --location --silent --show-error --retry 3 https://github.com/google/bundletool/releases/download/1.18.3/bundletool-all-1.18.3.jar --output \"$RUNNER_TEMP/bundletool.jar\"\necho 'a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29 '\"$RUNNER_TEMP/bundletool.jar\" | sha256sum --check --status\n"},{name: Build,working-directory: apps/mobile,env: {RUNTIME: "${{ needs.web.outputs.android_runtime }}",BUNDLETOOL_JAR: "${{ runner.temp }}/bundletool.jar",DISPOSABL_ANDROID_CHANNEL: "${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}",DISPOSABL_ANDROID_SIGNING: "${{ github.event_name == 'push' && secrets.DISPOSABL_ANDROID_SIGNING || '' }}",ANDROID_KEYSTORE_BASE64: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}",ANDROID_KEYSTORE_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}",ANDROID_KEY_ALIAS: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}",ANDROID_KEY_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" android-build"},*item5,*item6]},android-submit: {name: Android Play submission,needs: android,if: "github.event_name == 'push' && vars.ANDROID_PLAY_SUBMIT == 'true' && needs.android.result == 'success'",runs-on: ubuntu-24.04,timeout-minutes: 30,permissions: {contents: read},env: {EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1"},steps: [*item0,*item1,*item2,{uses: actions/setup-java@v5,with: {distribution: temurin,java-version: "17"}},{uses: actions/download-artifact@v4,with: {name: release-android,path: dist/release}},{name: Submit Android bundle,working-directory: apps/mobile,env: {ANDROID_PLAY_SERVICE_ACCOUNT: "${{ secrets.ANDROID_PLAY_SERVICE_ACCOUNT }}",ANDROID_PLAY_TRACK: "${{ vars.ANDROID_PLAY_TRACK }}",ANDROID_PLAY_UPLOAD_CERT_SHA256: "${{ vars.ANDROID_PLAY_UPLOAD_CERT_SHA256 }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" android-submit"}]},android-failure: {name: Report Android failure,needs: android,if: "always() && (needs.android.result == 'failure' || needs.android.result == 'cancelled')",permissions: {contents: read,id-token: write},runs-on: ubuntu-24.04,timeout-minutes: 5,steps: [*item0,*item1,{run: "node .github/scripts/disposabl.mjs report android failed \"Android build failed or was cancelled; check the workflow log.\""}]},ios-preview: {name: iOS simulator preview,needs: [changes,web],if: "github.event_name == 'pull_request' && needs.web.outputs.ios == 'true'",permissions: *permissions,runs-on: "${{ needs.changes.outputs.macos_runner }}",timeout-minutes: 20,env: {EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",CONVEX_URL: "${{ needs.web.outputs.convex_url }}",CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PUBLIC_CONVEX_URL: "${{ needs.web.outputs.convex_url }}",EXPO_PUBLIC_CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1"},steps: [*item0,*item1,*item2,*item3,*item4,{name: Report build,run: node .github/scripts/disposabl.mjs report ios building},{name: Load Expo environment,if: "env.EXPO_TOKEN != ''",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Verify update channel,if: "env.EXPO_TOKEN != ''",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-channel"},{name: Publish compatible iOS preview update,if: "env.EXPO_TOKEN != ''",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" ota"},{name: Xcode toolchain,run: "xcodebuild -version\nxcrun swift --version\n"},{name: Build simulator archive,working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" simulator"},{uses: actions/upload-artifact@v4,with: {name: ios-simulator,path: dist/apple/ios-simulator.zip,retention-days: 3,compression-level: 0,if-no-files-found: error}},{name: Report simulator archive,run: "echo 'iOS simulator archive is available in this workflow run’s artifacts; it is not a device or TestFlight build.' >> \"$GITHUB_STEP_SUMMARY\"\nnode .github/scripts/disposabl.mjs report ios ready 'Simulator archive available in workflow artifacts.'\n"},{name: Report failure,if: failure() || cancelled(),run: "node .github/scripts/disposabl.mjs report ios failed 'iOS simulator build failed; check the workflow log.'"}]},ios-production: {name: iOS production and TestFlight,needs: [changes,web],if: "github.event_name == 'push' && needs.web.outputs.ios == 'true'",permissions: *permissions,runs-on: "${{ needs.changes.outputs.linux_runner }}",timeout-minutes: 20,env: {EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1",CONVEX_URL: "${{ needs.web.outputs.convex_url }}",CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PUBLIC_CONVEX_URL: "${{ needs.web.outputs.convex_url }}",EXPO_PUBLIC_CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}"},steps: [*item0,*item1,*item2,*item3,*item4,{name: Check Expo connection,id: apple-prerequisites,working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" prerequisites"},{name: Load Expo environment,if: "steps.apple-prerequisites.outputs.ready == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Verify update channel,if: "steps.apple-prerequisites.outputs.ready == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-channel"},{name: Select iOS update or native build,id: ios-plan,if: "steps.apple-prerequisites.outputs.ready == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" ota-plan"},{name: Publish compatible iOS production update,if: "steps.ios-plan.outputs.action == 'update'",working-directory: apps/mobile,env: {RUNTIME: "${{ steps.ios-plan.outputs.runtime }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" ota"},{name: Build and submit to TestFlight,if: "steps.ios-plan.outputs.action == 'build'",working-directory: apps/mobile,env: {ASC_APP_ID: "${{ secrets.ASC_APP_ID || vars.ASC_APP_ID }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" production"},{name: Reconcile delivery of the compatible native build,if: "steps.ios-plan.outputs.action == 'update'",working-directory: apps/mobile,env: {BUILD_ID: "${{ steps.ios-plan.outputs.build_id }}",ASC_APP_ID: "${{ secrets.ASC_APP_ID || vars.ASC_APP_ID }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" deliver"},{name: Report failure,if: failure() || cancelled(),run: "node .github/scripts/disposabl.mjs report ios failed 'iOS update, native build or submission failed; check the workflow log.'"}]},desktop: {needs: web,permissions: *permissions,name: "${{ matrix.platform }}",if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.web.outputs.desktop != '[]' && needs.web.outputs.desktop != ''",strategy: {fail-fast: false,matrix: {include: "${{ fromJSON(needs.web.outputs.desktop) }}"}},runs-on: "${{ matrix.runner }}",timeout-minutes: 20,env: {PLATFORM: "${{ matrix.platform }}",DISPOSABL_RELEASE_VERSION: "1.${{ github.run_number }}.${{ github.run_attempt }}",DISPOSABL_DESKTOP_PLATFORM: "${{ matrix.platform }}",DISPOSABL_DESKTOP_UPDATE_CHANNEL: production,CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",electron_config_cache: "${{ github.workspace }}/.cache/electron"},steps: [*item0,*item1,*item2,*item3,*item4,{name: Report desktop build,run: "node .github/scripts/disposabl.mjs report \"$PLATFORM\" building"},{name: Electron,uses: actions/cache@v4,with: {path: .cache/electron,key: "electron-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }}"}},{name: Packages,if: "matrix.platform == 'linux'",run: "command -v fakeroot && command -v rpmbuild && command -v dpkg-deb || { sudo apt-get update && sudo apt-get install -y fakeroot dpkg rpm; }"},{name: Configure desktop update identity,shell: bash,run: "id=$(node -p \"require('./disposabl.json').desktopId || ''\")\nif [[ ! \"$id\" =~ ^[a-f0-9]{32}$ ]]; then echo 'Desktop identity missing; regenerate this app before its first installation.' >&2; exit 1; fi\necho \"DISPOSABL_DESKTOP_ID=$id\" >> \"$GITHUB_ENV\"\necho \"DISPOSABL_DESKTOP_UPDATE_URL=${CONVEX_SITE_URL}/desktop/updates/$id\" >> \"$GITHUB_ENV\"\n"},{name: Build,if: "matrix.platform != 'macos'",run: bun run --cwd apps/desktop preview},{name: Build macOS,if: "matrix.platform == 'macos'",shell: bash,env: {MACOS_SIGNING_CONFIG: "${{ secrets.MACOS_SIGNING_CONFIG }}"},run: bash .github/scripts/macos-release.sh},*item5,{name: Publish desktop update feed,if: "matrix.platform == 'windows' || (matrix.platform == 'macos' && env.MACOS_NOTARIZE == 'true')",shell: bash,env: {CONVEX_DEPLOY_KEY: "${{ secrets.CONVEX_DEPLOY_KEY }}"},run: "test \"$(gh api \"repos/$GH_REPO/git/ref/heads/main\" --jq .object.sha)\" = \"$SOURCE\"\nnode apps/desktop/publish-update.mjs\n"},{name: Upload desktop release artifacts,if: "matrix.platform != 'macos' || env.MACOS_NOTARIZE == 'true'",uses: actions/upload-artifact@v4,with: {name: "release-${{ env.PLATFORM }}",path: dist/release/,retention-days: 3,compression-level: 0,if-no-files-found: error}},{name: Upload staged update feed,if: "matrix.platform != 'linux' && env.DISPOSABL_DESKTOP_UPDATE_URL != '' && (matrix.platform != 'macos' || env.MACOS_NOTARIZE == 'true')",uses: actions/upload-artifact@v4,with: {name: "desktop-update-${{ env.PLATFORM }}",path: dist/update/,retention-days: 3,if-no-files-found: error}},{name: Upload unsigned macOS artifact,if: "matrix.platform == 'macos' && env.MACOS_NOTARIZE != 'true'",uses: actions/upload-artifact@v4,with: {name: macos-unsigned,path: "dist/release/*.dmg\ndist/release/*.zip\n",retention-days: 3,compression-level: 0,if-no-files-found: error}},{name: Report macOS artifact,if: "matrix.platform == 'macos' && env.MACOS_NOTARIZE != 'true'",run: "echo 'macOS DMG is ad-hoc signed, not Developer ID signed or notarized. Download it from this workflow run’s artifacts.' >> \"$GITHUB_STEP_SUMMARY\"\nnode .github/scripts/disposabl.mjs report macos blocked 'Ad-hoc signed DMG available in workflow artifacts; Developer ID signing and notarization are not configured.'\n"},{name: Report desktop failure,if: failure() || cancelled(),run: "node .github/scripts/disposabl.mjs report \"$PLATFORM\" failed"},{name: Clean up macOS signing,if: "always() && matrix.platform == 'macos'",shell: bash,run: bash .github/scripts/macos-release.sh cleanup}]},packages: {name: "Package / ${{ matrix.package }}",needs: [changes,web],if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.web.outputs.packages != '[]' && needs.web.outputs.packages != ''",runs-on: "${{ needs.changes.outputs.linux_runner }}",timeout-minutes: 15,permissions: {contents: write,id-token: write},concurrency: {group: "npm-${{ matrix.package }}",cancel-in-progress: false},strategy: {fail-fast: false,matrix: {package: "${{ fromJSON(needs.web.outputs.packages) }}"}},env: {PACKAGE: "${{ matrix.package }}"},steps: [{uses: actions/checkout@v6,with: {fetch-depth: 0,persist-credentials: false}},*item1,*item2,*item3,*item4,{name: Disposabl GitHub App token,run: node .github/scripts/disposabl.mjs token},{name: Publish package if configured,run: bash .github/scripts/release.sh package-release}]},publish: {needs: [changes,web,android,desktop],if: "always() && !cancelled() && needs.web.result == 'success' && (needs.web.outputs.release == 'true' || needs.android.result == 'success' || needs.desktop.result == 'success')",environment: publishing,runs-on: "${{ needs.changes.outputs.linux_runner }}",timeout-minutes: 15,permissions: {contents: write,actions: read,id-token: write},steps: [{uses: actions/checkout@v6,with: {ref: main,persist-credentials: false}},{uses: actions/setup-node@v6,with: {node-version: "24",package-manager-cache: false}},{name: Disposabl installation token,run: node .github/scripts/disposabl.mjs token},{name: Select release source,id: source,run: bash .github/scripts/release.sh release-source},{uses: actions/download-artifact@v4,if: "steps.source.outputs.current == 'true'",with: {pattern: release-*,path: artifacts}},{name: Publish verified build artifacts,if: "steps.source.outputs.current == 'true'",run: bash .github/scripts/release.sh release-publish}]}}}
1
+ {name: Pipeline,"on": {pull_request: {branches: [main]},push: {branches: [main]}},permissions: {contents: read,pull-requests: read},concurrency: {group: "${{ github.workflow }}-${{ github.ref }}",cancel-in-progress: "${{ github.event_name == 'pull_request' }}"},env: {CHANNEL: "${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}",DISPOSABL_MOBILE_CHANNEL: "${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}",EAS_ENVIRONMENT: "${{ github.event_name == 'push' && 'production' || 'preview' }}",EAS_CLI: eas-cli@27.2.0,BUN_VERSION: 1.4.4,NODE_VERSION: "24",LINUX_RUNNER: ubuntu-24.04,WEB_RUNNER: ubuntu-24.04,WINDOWS_RUNNER: windows-2025,MACOS_RUNNER: macos-26,RELEASE_PREFIX: app,DISPOSABL_ANDROID_VERSION_CODE: "${{ github.run_number }}",DISPOSABL_IOS_BUILD_NUMBER: "${{ github.run_number }}",GH_TOKEN: "${{ github.token }}",GH_REPO: "${{ github.repository }}",SOURCE: "${{ github.event.pull_request.head.sha || github.sha }}",SOURCE_PATH: "${{ github.event_name == 'pull_request' && format('pulls/{0}', github.event.number) || 'git/ref/heads/main' }}",DISPOSABL_RELEASE_VERSION: "1.0.${{ github.run_number }}"},jobs: {changes: {name: Select work,if: "github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository",permissions: {contents: read,pull-requests: read,actions: read},runs-on: ubuntu-24.04,timeout-minutes: 30,outputs: {linux_runner: "${{ steps.platforms.outputs.linux_runner }}",android_runner: "${{ steps.platforms.outputs.android_runner }}",macos_runner: "${{ steps.platforms.outputs.macos_runner }}",changed: "${{ steps.platforms.outputs.changed }}",android: "${{ steps.platforms.outputs.android }}",ios: "${{ steps.platforms.outputs.ios }}",desktop: "${{ steps.platforms.outputs.desktop }}",packages: "${{ steps.platforms.outputs.packages }}"},steps: [&item0 {uses: actions/checkout@v6,with: {ref: "${{ env.SOURCE }}",persist-credentials: false}},{name: Select affected platforms,shell: bash,id: platforms,env: {PR: "${{ github.event.number }}",EXPO_CONNECTED: "${{ secrets.EXPO_TOKEN != '' }}",IOS_BUILDS_ENABLED: "${{ vars.IOS_BUILDS_ENABLED != 'false' }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/platforms.sh\""}]},web: {name: Web,needs: changes,if: "needs.changes.outputs.changed == 'true'",permissions: &permissions {contents: read,pull-requests: read,id-token: write},timeout-minutes: 20,runs-on: "${{ needs.changes.outputs.linux_runner }}",outputs: {desktop: "${{ needs.changes.outputs.desktop }}",ios: "${{ needs.changes.outputs.ios }}",packages: "${{ needs.changes.outputs.packages }}",release: "${{ steps.artifacts.outcome == 'success' }}",android_build: "${{ steps.fingerprint.outputs.build }}",android_runtime: "${{ steps.fingerprint.outputs.runtime }}",convex_url: "${{ steps.deploy.outputs.CONVEX_URL }}",convex_site_url: "${{ steps.deploy.outputs.CONVEX_SITE_URL }}"},env: {PLATFORM: android,DISPOSABL_ANDROID_SIGNING: "${{ github.event_name == 'push' && secrets.DISPOSABL_ANDROID_SIGNING || '' }}",ANDROID_KEYSTORE_BASE64: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}",ANDROID_KEYSTORE_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}",ANDROID_KEY_ALIAS: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}",ANDROID_KEY_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}",ANDROID_PLAY_SUBMIT: "${{ vars.ANDROID_PLAY_SUBMIT }}",EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1"},steps: [*item0,&item1 {uses: actions/setup-node@v6,with: {node-version: "24",package-manager-cache: false}},&item2 {uses: oven-sh/setup-bun@v2,with: {bun-version: 1.4.4}},&item3 {uses: actions/cache@v4,with: {path: ~/.bun/install/cache,key: "bun-${{ github.job == 'desktop' && 'desktop-' || '' }}${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}-${{ hashFiles('bun.lock') }}",restore-keys: "bun-${{ github.job == 'desktop' && 'desktop-' || '' }}${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}-"}},&item4 {run: "bun install --frozen-lockfile ${{ github.job == 'desktop' && '--filter \"*desktop*\" --filter @disposabl/backend' || (github.job == 'android' || startsWith(github.job, 'ios-')) && '--filter @disposabl/mobile' || '' }}"},{name: Report build start,run: "node .github/scripts/disposabl.mjs report web,api,mcp building\nif [[ -z \"$EXPO_TOKEN\" ]]; then node .github/scripts/disposabl.mjs report android blocked 'Connect Expo before building Android.'; fi\nif [[ '${{ github.event_name }}' == pull_request ]]; then node .github/scripts/disposabl.mjs report cli,typescript-sdk blocked 'Packages publish after merge to main.'; fi\n"},{name: Check,run: bun run check},{name: Build selected clients,run: "for package in cli sdk; do\n if test -f \"packages/$package/package.json\"; then bun run --cwd \"packages/$package\" build; fi\ndone\n"},{name: Deploy,id: deploy,timeout-minutes: 10,env: {TRUSTED: "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}",CONVEX_DEPLOY_KEY: "${{ secrets[github.event_name == 'push' && 'CONVEX_DEPLOY_KEY' || 'CONVEX_DEPLOY_KEY_PREVIEW'] }}"},run: "if [[ \"$TRUSTED\" != true ]]; then VITE_CONVEX_URL=https://ci.invalid VITE_CONVEX_SITE_URL=https://ci.invalid bun run build --filter=@disposabl/web; exit; fi\n: \"${CONVEX_DEPLOY_KEY:?Configure the Convex deployment secret for this repository}\"\ncd packages/backend\nexport AUTH_TARGET=--prod\ntarget=()\nif [[ \"$CHANNEL\" != production ]]; then export AUTH_TARGET=\"--preview-name $CHANNEL\"; target=(--preview-name \"$CHANNEL\"); fi\nbun x --no-install convex deploy --yes \"${target[@]}\" --cmd-url-env-var-name CONVEX_URL --cmd 'for name in CONVEX_URL CONVEX_SITE_URL; do value=$(printenv \"$name\"); test -n \"$value\" || exit 1; for prefix in \"\" VITE_ EXPO_PUBLIC_; do export \"$prefix$name=$value\"; printf \"%s=%s\\n\" \"$prefix$name\" \"$value\" | tee -a \"$GITHUB_ENV\" >> \"$GITHUB_OUTPUT\"; done; done; bun run --cwd ../.. build --filter=@disposabl/web'\nsetup_target=(--prod)\nif [[ \"$CHANNEL\" != production ]]; then setup_target=(\"${target[@]}\"); fi\nbun x --no-install convex run \"${setup_target[@]}\" billing:setup '{}'\nbun x --no-install static-hosting upload $AUTH_TARGET --no-spa --dist ../../apps/web/dist/client\n"},{name: Report web result,if: always(),run: "node .github/scripts/disposabl.mjs report web,api,mcp ${{ steps.deploy.outcome == 'success' && 'ready' || 'failed' }}"},{name: Expo,if: "needs.changes.outputs.android == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Channel,if: "needs.changes.outputs.android == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-channel"},{name: Fingerprint,id: fingerprint,if: "needs.changes.outputs.android == 'true'",env: {},working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-fingerprint"},{name: Update,if: "steps.fingerprint.outputs.build == 'false'",env: {TAG: "${{ steps.fingerprint.outputs.tag }}",SHA: "${{ steps.fingerprint.outputs.sha }}",RUNTIME: "${{ steps.fingerprint.outputs.runtime }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-update"},&item5 {name: Publish,if: "github.job == 'android' || (github.job == 'web' && hashFiles('dist/release/android.json') != '') || github.job == 'desktop'",shell: bash,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/release.sh\" verify-artifacts"},&item6 {name: Upload release artifacts,id: artifacts,if: "hashFiles('dist/release/*') != ''",uses: actions/upload-artifact@v4,with: {name: "release-${{ env.PLATFORM }}",path: dist/release/,retention-days: 3,compression-level: 0,if-no-files-found: error}}]},android: {name: Android,needs: [changes,web],if: "needs.web.outputs.android_build == 'true'",permissions: *permissions,runs-on: "${{ needs.changes.outputs.android_runner }}",timeout-minutes: 30,env: {PLATFORM: android,EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1",CONVEX_URL: "${{ needs.web.outputs.convex_url }}",CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PUBLIC_CONVEX_URL: "${{ needs.web.outputs.convex_url }}",EXPO_PUBLIC_CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",ANDROID_PLAY_SUBMIT: "${{ vars.ANDROID_PLAY_SUBMIT }}"},steps: [*item0,{name: Prepare Android disk space,run: bash .github/scripts/android-runner.sh prepare},*item1,*item2,*item3,*item4,{name: Report mobile build,run: "node .github/scripts/disposabl.mjs report \"$PLATFORM\" building"},{name: Expo,working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Java,uses: actions/setup-java@v5,with: {distribution: temurin,java-version: "17"}},{name: SDK,uses: android-actions/setup-android@v3,with: {packages: platform-tools}},{name: Gradle,uses: gradle/actions/setup-gradle@v4,with: {cache-read-only: false}},{name: Restore native compiler cache,if: "github.event_name == 'push'",id: native-cache,uses: actions/cache/restore@v4,with: {path: "${{ runner.temp }}/ccache",key: "android-ccache-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}"}},{name: Install native compiler cache,if: "github.event_name == 'push' && steps.native-cache.outputs.cache-hit == 'true'",run: "sudo apt-get update -qq\nsudo apt-get install -y ccache\nprintf 'CCACHE_DIR=%s\\nCCACHE_COMPILERCHECK=content\\nCMAKE_C_COMPILER_LAUNCHER=ccache\\nCMAKE_CXX_COMPILER_LAUNCHER=ccache\\n' \"$RUNNER_TEMP/ccache\" >> \"$GITHUB_ENV\"\n"},{name: Select Android bundle validation,id: bundletool-needed,env: {SIGNING_BUNDLE: "${{ github.event_name == 'push' && secrets.DISPOSABL_ANDROID_SIGNING || '' }}",SIGNING_STORE: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}",SIGNING_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}",SIGNING_ALIAS: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}",SIGNING_KEY_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}"},run: "if [[ -n \"$SIGNING_BUNDLE$SIGNING_STORE$SIGNING_PASSWORD$SIGNING_ALIAS$SIGNING_KEY_PASSWORD\" ]]; then echo 'needed=true' >> \"$GITHUB_OUTPUT\"; fi\n"},{name: Download verified bundletool,if: "steps.bundletool-needed.outputs.needed == 'true'",run: "curl --fail --location --silent --show-error --retry 3 https://github.com/google/bundletool/releases/download/1.18.3/bundletool-all-1.18.3.jar --output \"$RUNNER_TEMP/bundletool.jar\"\necho 'a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29 '\"$RUNNER_TEMP/bundletool.jar\" | sha256sum --check --status\n"},{name: Build,working-directory: apps/mobile,env: {RUNTIME: "${{ needs.web.outputs.android_runtime }}",BUNDLETOOL_JAR: "${{ runner.temp }}/bundletool.jar",DISPOSABL_ANDROID_CHANNEL: "${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}",DISPOSABL_ANDROID_SIGNING: "${{ github.event_name == 'push' && secrets.DISPOSABL_ANDROID_SIGNING || '' }}",ANDROID_KEYSTORE_BASE64: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}",ANDROID_KEYSTORE_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}",ANDROID_KEY_ALIAS: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}",ANDROID_KEY_PASSWORD: "${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" android-build"},*item5,*item6]},android-submit: {name: Android Play submission,needs: android,if: "github.event_name == 'push' && vars.ANDROID_PLAY_SUBMIT == 'true' && needs.android.result == 'success'",runs-on: ubuntu-24.04,timeout-minutes: 30,permissions: {contents: read},env: {EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1"},steps: [*item0,*item1,*item2,{uses: actions/setup-java@v5,with: {distribution: temurin,java-version: "17"}},{uses: actions/download-artifact@v4,with: {name: release-android,path: dist/release}},{name: Submit Android bundle,working-directory: apps/mobile,env: {ANDROID_PLAY_SERVICE_ACCOUNT: "${{ secrets.ANDROID_PLAY_SERVICE_ACCOUNT }}",ANDROID_PLAY_TRACK: "${{ vars.ANDROID_PLAY_TRACK }}",ANDROID_PLAY_UPLOAD_CERT_SHA256: "${{ vars.ANDROID_PLAY_UPLOAD_CERT_SHA256 }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" android-submit"}]},android-failure: {name: Report Android failure,needs: android,if: "always() && (needs.android.result == 'failure' || needs.android.result == 'cancelled')",permissions: {contents: read,id-token: write},runs-on: ubuntu-24.04,timeout-minutes: 5,steps: [*item0,*item1,{run: "node .github/scripts/disposabl.mjs report android failed \"Android build failed or was cancelled; check the workflow log.\""}]},ios-preview: {name: iOS simulator preview,needs: [changes,web],if: "github.event_name == 'pull_request' && needs.web.outputs.ios == 'true'",permissions: *permissions,runs-on: "${{ needs.changes.outputs.macos_runner }}",timeout-minutes: 20,env: {EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",CONVEX_URL: "${{ needs.web.outputs.convex_url }}",CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PUBLIC_CONVEX_URL: "${{ needs.web.outputs.convex_url }}",EXPO_PUBLIC_CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1"},steps: [*item0,*item1,*item2,*item3,*item4,{name: Report build,run: node .github/scripts/disposabl.mjs report ios building},{name: Load Expo environment,if: "env.EXPO_TOKEN != ''",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Verify update channel,if: "env.EXPO_TOKEN != ''",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-channel"},{name: Publish compatible iOS preview update,if: "env.EXPO_TOKEN != ''",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" ota"},{name: Xcode toolchain,run: "xcodebuild -version\nxcrun swift --version\n"},{name: Build simulator archive,working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" simulator"},{uses: actions/upload-artifact@v4,with: {name: ios-simulator,path: dist/apple/ios-simulator.zip,retention-days: 3,compression-level: 0,if-no-files-found: error}},{name: Report simulator archive,run: "echo 'iOS simulator archive is available in this workflow run’s artifacts; it is not a device or TestFlight build.' >> \"$GITHUB_STEP_SUMMARY\"\nnode .github/scripts/disposabl.mjs report ios ready 'Simulator archive available in workflow artifacts.'\n"},{name: Report failure,if: failure() || cancelled(),run: "node .github/scripts/disposabl.mjs report ios failed 'iOS simulator build failed; check the workflow log.'"}]},ios-production: {name: iOS production and TestFlight,needs: [changes,web],if: "github.event_name == 'push' && needs.web.outputs.ios == 'true'",permissions: *permissions,runs-on: "${{ needs.changes.outputs.linux_runner }}",timeout-minutes: 20,env: {EXPO_TOKEN: "${{ secrets.EXPO_TOKEN }}",EXPO_PROJECT_ID: "${{ secrets.EXPO_PROJECT_ID || vars.EXPO_PROJECT_ID }}",EXPO_OWNER: "${{ secrets.EXPO_OWNER || vars.EXPO_OWNER }}",EXPO_SLUG: "${{ secrets.EXPO_SLUG || vars.EXPO_SLUG }}",EXPO_NO_DOTENV: "1",CONVEX_URL: "${{ needs.web.outputs.convex_url }}",CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",EXPO_PUBLIC_CONVEX_URL: "${{ needs.web.outputs.convex_url }}",EXPO_PUBLIC_CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}"},steps: [*item0,*item1,*item2,*item3,*item4,{name: Check Expo connection,id: apple-prerequisites,working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" prerequisites"},{name: Load Expo environment,if: "steps.apple-prerequisites.outputs.ready == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-env"},{name: Verify update channel,if: "steps.apple-prerequisites.outputs.ready == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/mobile.sh\" expo-channel"},{name: Select iOS update or native build,id: ios-plan,if: "steps.apple-prerequisites.outputs.ready == 'true'",working-directory: apps/mobile,run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" ota-plan"},{name: Publish compatible iOS production update,if: "steps.ios-plan.outputs.action == 'update'",working-directory: apps/mobile,env: {RUNTIME: "${{ steps.ios-plan.outputs.runtime }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" ota"},{name: Build and submit to TestFlight,if: "steps.ios-plan.outputs.action == 'build'",working-directory: apps/mobile,env: {ASC_APP_ID: "${{ secrets.ASC_APP_ID || vars.ASC_APP_ID }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" production"},{name: Reconcile delivery of the compatible native build,if: "steps.ios-plan.outputs.action == 'update'",working-directory: apps/mobile,env: {BUILD_ID: "${{ steps.ios-plan.outputs.build_id }}",ASC_APP_ID: "${{ secrets.ASC_APP_ID || vars.ASC_APP_ID }}"},run: "bash \"$GITHUB_WORKSPACE/.github/scripts/apple.sh\" deliver"},{name: Report failure,if: failure() || cancelled(),run: "node .github/scripts/disposabl.mjs report ios failed 'iOS update, native build or submission failed; check the workflow log.'"}]},desktop: {needs: web,permissions: *permissions,name: "${{ matrix.platform }}",if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.web.outputs.desktop != '[]' && needs.web.outputs.desktop != ''",strategy: {fail-fast: false,matrix: {include: "${{ fromJSON(needs.web.outputs.desktop) }}"}},runs-on: "${{ matrix.runner }}",timeout-minutes: 20,env: {PLATFORM: "${{ matrix.platform }}",DISPOSABL_RELEASE_VERSION: "1.${{ github.run_number }}.${{ github.run_attempt }}",DISPOSABL_DESKTOP_PLATFORM: "${{ matrix.platform }}",DISPOSABL_DESKTOP_UPDATE_CHANNEL: production,CONVEX_SITE_URL: "${{ needs.web.outputs.convex_site_url }}",electron_config_cache: "${{ github.workspace }}/.cache/electron"},steps: [*item0,*item1,*item2,*item3,*item4,{name: Report desktop build,run: "node .github/scripts/disposabl.mjs report \"$PLATFORM\" building"},{name: Electron,uses: actions/cache@v4,with: {path: .cache/electron,key: "electron-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }}"}},{name: Packages,if: "matrix.platform == 'linux'",run: "command -v fakeroot && command -v rpmbuild && command -v dpkg-deb || { sudo apt-get update && sudo apt-get install -y fakeroot dpkg rpm; }"},{name: Configure desktop update identity,shell: bash,run: "id=$(node -p \"require('./disposabl.json').desktopId || ''\")\nif [[ ! \"$id\" =~ ^[a-f0-9]{32}$ ]]; then echo 'Desktop identity missing; regenerate this app before its first installation.' >&2; exit 1; fi\necho \"DISPOSABL_DESKTOP_ID=$id\" >> \"$GITHUB_ENV\"\necho \"DISPOSABL_DESKTOP_UPDATE_URL=${CONVEX_SITE_URL}/desktop/updates/$id\" >> \"$GITHUB_ENV\"\n"},{name: Build,if: "matrix.platform != 'macos'",run: bun run --cwd apps/desktop preview},{name: Build macOS,if: "matrix.platform == 'macos'",shell: bash,env: {MACOS_SIGNING_CONFIG: "${{ secrets.MACOS_SIGNING_CONFIG }}"},run: bash .github/scripts/macos-release.sh},*item5,{name: Publish desktop update feed,if: "matrix.platform == 'windows' || (matrix.platform == 'macos' && env.MACOS_NOTARIZE == 'true')",shell: bash,env: {CONVEX_DEPLOY_KEY: "${{ secrets.CONVEX_DEPLOY_KEY }}"},run: "test \"$(gh api \"repos/$GH_REPO/git/ref/heads/main\" --jq .object.sha)\" = \"$SOURCE\"\nnode apps/desktop/publish-update.mjs\n"},{name: Upload desktop release artifacts,if: "matrix.platform != 'macos' || env.MACOS_NOTARIZE == 'true'",uses: actions/upload-artifact@v4,with: {name: "release-${{ env.PLATFORM }}",path: dist/release/,retention-days: 3,compression-level: 0,if-no-files-found: error}},{name: Upload staged update feed,if: "matrix.platform != 'linux' && env.DISPOSABL_DESKTOP_UPDATE_URL != '' && (matrix.platform != 'macos' || env.MACOS_NOTARIZE == 'true')",uses: actions/upload-artifact@v4,with: {name: "desktop-update-${{ env.PLATFORM }}",path: dist/update/,retention-days: 3,if-no-files-found: error}},{name: Upload unsigned macOS artifact,if: "matrix.platform == 'macos' && env.MACOS_NOTARIZE != 'true'",uses: actions/upload-artifact@v4,with: {name: macos-unsigned,path: "dist/release/*.dmg\ndist/release/*.zip\n",retention-days: 3,compression-level: 0,if-no-files-found: error}},{name: Report macOS artifact,if: "matrix.platform == 'macos' && env.MACOS_NOTARIZE != 'true'",run: "echo 'macOS DMG is ad-hoc signed, not Developer ID signed or notarized. Download it from this workflow run’s artifacts.' >> \"$GITHUB_STEP_SUMMARY\"\nnode .github/scripts/disposabl.mjs report macos blocked 'Ad-hoc signed DMG available in workflow artifacts; Developer ID signing and notarization are not configured.'\n"},{name: Report desktop failure,if: failure() || cancelled(),run: "node .github/scripts/disposabl.mjs report \"$PLATFORM\" failed"},{name: Clean up macOS signing,if: "always() && matrix.platform == 'macos'",shell: bash,run: bash .github/scripts/macos-release.sh cleanup}]},packages: {name: "Package / ${{ matrix.package }}",needs: [changes,web],if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.web.outputs.packages != '[]' && needs.web.outputs.packages != ''",runs-on: ubuntu-24.04,timeout-minutes: 15,permissions: {contents: write,id-token: write},concurrency: {group: "npm-${{ matrix.package }}",cancel-in-progress: false},strategy: {fail-fast: false,matrix: {package: "${{ fromJSON(needs.web.outputs.packages) }}"}},env: {PACKAGE: "${{ matrix.package }}"},steps: [{uses: actions/checkout@v6,with: {fetch-depth: 0,persist-credentials: false}},*item1,*item2,*item3,*item4,{name: Disposabl GitHub App token,run: node .github/scripts/disposabl.mjs token},{name: Publish package if configured,run: bash .github/scripts/release.sh package-release}]},publish: {needs: [changes,web,android,desktop],if: "always() && !cancelled() && needs.web.result == 'success' && (needs.web.outputs.release == 'true' || needs.android.result == 'success' || needs.desktop.result == 'success')",environment: publishing,runs-on: "${{ needs.changes.outputs.linux_runner }}",timeout-minutes: 15,permissions: {contents: write,actions: read,id-token: write},steps: [{uses: actions/checkout@v6,with: {ref: main,persist-credentials: false}},{uses: actions/setup-node@v6,with: {node-version: "24",package-manager-cache: false}},{name: Disposabl installation token,run: node .github/scripts/disposabl.mjs token},{name: Select release source,id: source,run: bash .github/scripts/release.sh release-source},{uses: actions/download-artifact@v4,if: "steps.source.outputs.current == 'true'",with: {pattern: release-*,path: artifacts}},{name: Publish verified build artifacts,if: "steps.source.outputs.current == 'true'",run: bash .github/scripts/release.sh release-publish}]}}}
@@ -16,3 +16,5 @@ Run `bun run test --target ios` or `bun run test --target android` after install
16
16
  The release pipeline can publish compatible JavaScript and asset changes through EAS Update. Changes to native code or the runtime fingerprint require a new binary. Configure the Expo project and matching channel before publishing.
17
17
 
18
18
  The app downloads compatible updates at startup and after a long inactive period. A downloaded update can load on the next cold launch; the in-app update prompt lets a user restart sooner. Verify this with an installed release build—development builds and E2E builds do not prove OTA behavior.
19
+
20
+ For store builds, signing, review access, and release steps, see [Publishing](/publishing).
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Apple App Store
3
+ description: Build, test, and submit an iOS release.
4
+ ---
5
+
6
+ 1. **Use the right app record.** Confirm the Apple team, bundle identifier, app record, version, and a new build number. Use the existing record for an update. Check the EAS production profile, environment, distribution certificate, and provisioning profile. If the lockfile was made with a specific Bun version, pin that version in the EAS profile so a frozen install uses the same toolchain.
7
+ 2. **Build and upload.** Build a signed production iOS binary with EAS and upload it to App Store Connect. Upload success is not approval. Wait for [Apple processing](https://developer.apple.com/help/app-store-connect/manage-builds/upload-builds/), resolve export-compliance questions accurately, and select the processed build for the correct version.
8
+ 3. **Test the installed build.** Install through TestFlight or an appropriate signed distribution, then exercise login, the main flow, persistence, privacy controls, and account deletion. TestFlight purchases use Apple's sandbox. Verify the real transaction through the app, RevenueCat, and your billing balance before enabling production purchase readiness. Configure all products and the Paid Apps Agreement as needed; [Apple reviews in-app purchases in sandbox](https://developer.apple.com/help/app-review/before-submitting-for-review/configure-in-app-purchases/).
9
+ 4. **Complete the listing and review details.** Use genuine screenshots from the relevant Apple devices and accurate descriptions, privacy information, support and privacy URLs. Provide the dedicated Apple review account and clear steps to the main features. Include external services and other details Apple needs. Keep the account usable throughout review.
10
+ 5. **Submit and follow the status.** Associate the correct build with the version, submit the app and required in-app purchases, and monitor App Review. [Selecting a build](https://developer.apple.com/help/app-store-connect/manage-builds/choose-a-build-to-submit/) and uploading it are separate from submitting it for review and releasing it.
11
+
12
+ See [review access and updates](/publishing) for shared preparation. A compatible EAS Update can update JavaScript and assets, but it cannot replace a new signed binary when native capabilities change.
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Google Play
3
+ description: Sign, test, and submit an Android release.
4
+ ---
5
+
6
+ 1. **Keep the same signing identity.** Confirm the package name and increase the version code. Build a release Android App Bundle with the correct upload key. A debug APK proves neither release signing nor upgrade continuity. With Play App Signing, Google uses the app signing key for distributed installs; the upload key signs the bundle you send to Play. Preserve the upload keystore and its recovery process. See [Android app signing](https://developer.android.com/studio/publish/app-signing).
7
+ 2. **Check the right fingerprint.** In Play Console's App Integrity page, distinguish the upload certificate from the app signing certificate and compare the complete fingerprint and algorithm. Google Android OAuth clients commonly require the app signing certificate's **SHA-1**; other registration flows may request **SHA-256**. Neither fingerprint is a substitute for the other. See [Google's client authentication guide](https://developers.google.com/android/guides/client-auth).
8
+ 3. **Upload and test.** Upload the signed bundle to a suitable Play testing track and install the Play-delivered build on a device. EAS can build a bundle without a Play service account. If automated submission is not configured, download the verified bundle and upload it manually in Play Console. A successful EAS build or upload is not a Play review decision.
9
+ 4. **Complete review access and declarations.** Provide a dedicated Google review account that works without the reviewer's own provider accounts, personal payment, or an inaccessible one-time code. Test its complete flow and credits first. Complete the Data safety form, privacy policy, and app access instructions from the actual release. If users can create accounts, provide both the in-app deletion path and an accessible [web deletion request link](https://support.google.com/googleplay/android-developer/answer/13327111), including any retained-data exceptions. Give users a way to report offensive AI-generated content when applicable.
10
+ 5. **Submit and follow the status.** Verify the intended track, release notes, device screenshots, content declarations, and signing details. Submit in Play Console and follow the release through review and publication; a testing-track upload alone does not mean the production release is live.
11
+
12
+ See [review access and updates](/publishing) for account preparation, purchase testing, and EAS Update limits.
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: Publishing
3
+ description: Prepare, submit, and maintain a mobile store release.
4
+ ---
5
+
6
+ A successful build gives you a file to test. Uploading it gives the store a build to process. Neither means the app has passed review or is available to customers. Follow the store's status through approval and release.
7
+
8
+ - [Publish to the Apple App Store](/publishing/apple)
9
+ - [Publish to Google Play](/publishing/google-play)
10
+
11
+ ## Prepare review access
12
+
13
+ For an app that needs sign-in, maintain two separate, ordinary accounts: one for Apple review and one for Google Play review. Give each a working sign-in and enough credits or other access to exercise the complete app without asking a reviewer to create a provider account, pay personally, or wait for a one-time code. Keep the credentials in each store's private review-access fields, not in your repository or public documentation. [Apple](https://developer.apple.com/help/app-review/before-submitting-for-review/complete-review/) and [Google](https://support.google.com/googleplay/android-developer/answer/15748846) describe what access to provide.
14
+
15
+ If the app creates projects through GitHub, Convex, or Expo, connect each review account through the normal authorization flow to dedicated, isolated resources. Restrict access to the test resources each account needs. Check the actual permissions: creating repositories can require broader organization permissions than reading a single repository, and a Convex team authorization may cover more than one project. Do not copy another user's stored credentials or connect a personal organization with unrelated projects. Test the entire creation flow using each account, and make sure deleting or resetting one account does not remove the other's resources. Where a provider or feature is optional, configure it only if the review path needs it.
16
+
17
+ Keep a documented way for an operator to replenish test credits and reset each account's test data through normal provider administration. Do not invent a purchase or present a manual grant as one. For the actual purchase flow, use a real store sandbox transaction and verify the complete path: store receipt, RevenueCat webhook, provider credit balance, and usable credits in the app. Only enable global payment readiness after that proof. For example, Disposabl's current product offers a $5 monthly plan with 750 credits per cycle and a $5 top-up with 500 non-expiring credits; your app's prices, products, and terms may differ.
18
+
19
+ ## Privacy and updates
20
+
21
+ Publish an accurate privacy policy and support contact. Check what the shipped app and its SDKs collect or share, including connected providers, analytics, and AI services. Verify consent before sending personal data to third-party AI, and provide in-app reporting where your AI content requires it. Test account deletion and explain what is retained. Complete each store's privacy declarations from observed production behavior, not test-only assumptions.
22
+
23
+ EAS Update can deliver compatible JavaScript and assets to an installed binary with the matching runtime. Native dependencies, SDK changes, permissions, signing, or other native configuration changes require a new compatible store binary and the applicable store review. Test an update on the actual installed release build; an OTA publication does not itself prove delivery. See [Expo's runtime guidance](https://docs.expo.dev/build/updates/).
@@ -5,6 +5,7 @@
5
5
  },
6
6
  "build": {
7
7
  "ios-preview": {
8
+ "bun": "1.4.4",
8
9
  "developmentClient": false,
9
10
  "ios": {
10
11
  "simulator": true
@@ -14,6 +15,7 @@
14
15
  "channel": "preview"
15
16
  },
16
17
  "ios-production": {
18
+ "bun": "1.4.4",
17
19
  "developmentClient": false,
18
20
  "distribution": "store",
19
21
  "environment": "production",
@@ -6,33 +6,34 @@
6
6
  "@convex-dev/auth": "catalog:",
7
7
  "@disposabl/disposabl-kit": "workspace:*",
8
8
  "@expo-google-fonts/spline-sans": "^0.4.2",
9
- "@expo/ui": "~58.0.27",
9
+ "@expo/ui": "~58.0.28",
10
10
  "@expo/vector-icons": "^15.0.2",
11
11
  "convex": "catalog:",
12
- "expo": "~58.0.23",
12
+ "expo": "~58.0.25",
13
13
  "expo-build-properties": "~58.0.11",
14
14
  "expo-clipboard": "~58.0.4",
15
- "expo-constants": "~58.0.15",
16
- "expo-dev-client": "~58.0.18",
15
+ "expo-constants": "~58.0.16",
16
+ "expo-dev-client": "~58.0.20",
17
17
  "expo-device": "~58.0.5",
18
- "expo-font": "~58.0.11",
18
+ "expo-font": "~58.0.12",
19
19
  "expo-glass-effect": "~58.0.5",
20
- "expo-haptics": "~58.0.7",
20
+ "expo-haptics": "~58.0.8",
21
21
  "expo-image": "~58.0.18",
22
- "expo-linking": "~58.0.16",
23
- "expo-router": "~58.0.30",
24
- "expo-secure-store": "~58.0.2",
25
- "expo-splash-screen": "~58.0.13",
26
- "expo-status-bar": "~58.0.4",
27
- "expo-symbols": "~58.0.4",
22
+ "expo-linking": "~58.0.17",
23
+ "expo-router": "~58.0.31",
24
+ "expo-secure-store": "~58.0.3",
25
+ "expo-splash-screen": "~58.0.14",
26
+ "expo-status-bar": "~58.0.5",
27
+ "expo-symbols": "~58.0.5",
28
28
  "expo-system-ui": "~58.0.7",
29
- "expo-updates": "~58.0.21",
30
- "expo-web-browser": "~58.0.7",
29
+ "expo-updates": "~58.0.22",
30
+ "expo-web-browser": "~58.0.8",
31
31
  "nativewind": "5.0.0-rc.1",
32
32
  "react": "19.3.0",
33
33
  "react-native": "0.88.1",
34
34
  "react-native-css": "3.1.0-rc.1",
35
35
  "react-native-gesture-handler": "~3.3.0",
36
+ "react-native-keyboard-controller": "1.22.7",
36
37
  "react-native-purchases": "10.16.0",
37
38
  "react-native-purchases-ui": "10.16.0",
38
39
  "react-native-reanimated": "4.7.1",
@@ -3,6 +3,13 @@ import { readFileSync } from "node:fs";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { verifyBundle } from "./verify-play-aab.mjs";
5
5
 
6
+ export function verifyFingerprint(actual, expected) {
7
+ if (actual.trim() !== expected)
8
+ throw new Error(
9
+ "Artifact runtime fingerprint does not match release manifest",
10
+ );
11
+ }
12
+
6
13
  export function verifyInputs(config, manifest, env) {
7
14
  if (config.android?.package !== manifest.applicationId)
8
15
  throw new Error("Expo package does not match release manifest");
@@ -28,17 +35,30 @@ export function verifyInputs(config, manifest, env) {
28
35
  if (env.GH_REPO === "disposabl-dev/create-disposabl-app") {
29
36
  if (
30
37
  config.android?.package !== "com.yastai.disposabl" ||
31
- config.extra?.disposablAndroidPayments !== false ||
38
+ config.extra?.disposablAndroidPayments !== true ||
32
39
  JSON.stringify(abis) !== JSON.stringify(["arm64-v8a", "x86_64"]) ||
33
40
  env.EXPO_PUBLIC_DISPOSABL_ANALYTICS_ENABLED !== "true" ||
34
- env.UPDATE_POLICY !== "disabled" ||
35
- config.updates?.requestHeaders != null
41
+ env.UPDATE_POLICY !== "expo" ||
42
+ manifest.projectId !== "7609475b-183a-4488-b1b0-0d7cc35aaaf0" ||
43
+ config.extra?.eas?.projectId !== manifest.projectId ||
44
+ config.android?.runtimeVersion?.policy !== "fingerprint" ||
45
+ !/^[a-f0-9]{40,64}$/.test(manifest.runtimeVersion || "") ||
46
+ config.updates?.enabled === false ||
47
+ config.updates?.url !== `https://u.expo.dev/${manifest.projectId}` ||
48
+ JSON.stringify(config.updates?.requestHeaders) !==
49
+ JSON.stringify({ "expo-channel-name": "production" })
36
50
  )
37
51
  throw new Error("Disposabl production configuration policy mismatch");
38
- // Shared builds retain the Expo identity for runtime fingerprinting.
39
- // That identity never enables OTA: URL, headers and enabled are checked.
40
- if (config.extra?.eas?.projectId !== manifest.projectId)
41
- throw new Error("Disposabl Expo project identity mismatch");
52
+ if (env.ANDROID_PLAY_SUBMIT === "true") {
53
+ for (const name of [
54
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_API_KEY",
55
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_MONTHLY_PRODUCT",
56
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_APP_ID",
57
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_TOPUP_PRODUCT",
58
+ ]) {
59
+ if (!env[name]?.trim()) throw new Error(`Missing ${name}`);
60
+ }
61
+ }
42
62
  }
43
63
  if (env.EXPO_PUBLIC_E2E === "true")
44
64
  throw new Error("E2E is not permitted in production");
@@ -67,6 +87,22 @@ export function verifyEmbedded(config, embedded) {
67
87
  ["version", embedded.android?.versionCode, config.android?.versionCode],
68
88
  ["scheme", embedded.scheme, config.scheme],
69
89
  ["updates", embedded.updates?.enabled, config.updates?.enabled],
90
+ ["update URL", embedded.updates?.url, config.updates?.url],
91
+ [
92
+ "update headers",
93
+ embedded.updates?.requestHeaders,
94
+ config.updates?.requestHeaders,
95
+ ],
96
+ [
97
+ "runtime policy",
98
+ embedded.android?.runtimeVersion,
99
+ config.android?.runtimeVersion,
100
+ ],
101
+ [
102
+ "Expo project",
103
+ embedded.extra?.eas?.projectId,
104
+ config.extra?.eas?.projectId,
105
+ ],
70
106
  [
71
107
  "payments",
72
108
  embedded.extra?.disposablAndroidPayments,
@@ -99,6 +135,20 @@ if (
99
135
  execFileSync("unzip", ["-p", artifact, entry], { encoding: "utf8" }),
100
136
  );
101
137
  verifyEmbedded(config, embedded);
138
+ if (
139
+ process.env.GH_REPO === "disposabl-dev/create-disposabl-app" &&
140
+ process.env.CHANNEL === "production"
141
+ ) {
142
+ const prefix = artifact.endsWith(".aab") ? "base/assets" : "assets";
143
+ const fingerprint = execFileSync(
144
+ "unzip",
145
+ ["-p", artifact, `${prefix}/fingerprint`],
146
+ {
147
+ encoding: "utf8",
148
+ },
149
+ ).trim();
150
+ verifyFingerprint(fingerprint, manifest.runtimeVersion);
151
+ }
102
152
  if (artifact.endsWith(".aab")) {
103
153
  if (!process.env.BUNDLETOOL_JAR)
104
154
  throw new Error("Bundletool is required for AAB validation");
@@ -110,6 +160,11 @@ if (
110
160
  expectedCert: cert.toUpperCase(),
111
161
  bundletool: process.env.BUNDLETOOL_JAR,
112
162
  production: process.env.CHANNEL === "production",
163
+ updates:
164
+ process.env.GH_REPO === "disposabl-dev/create-disposabl-app" &&
165
+ process.env.CHANNEL === "production"
166
+ ? { projectId: manifest.projectId, channel: "production" }
167
+ : undefined,
113
168
  });
114
169
  }
115
170
  } else if (operation !== "inputs")
@@ -198,6 +198,10 @@ const verified = verifyBundle({
198
198
  expectedCert: signingCert,
199
199
  bundletool: required("BUNDLETOOL_JAR"),
200
200
  production: true,
201
+ updates:
202
+ env.UPDATE_POLICY === "expo"
203
+ ? { projectId: required("EXPO_PROJECT_ID"), channel: "production" }
204
+ : undefined,
201
205
  });
202
206
  const { uploadCertificateSha256: _certificate, ...bundleResult } = verified;
203
207
  console.log(
@@ -9,6 +9,39 @@ export function fingerprint(text) {
9
9
  return matches[0][1].replaceAll(":", "").toUpperCase();
10
10
  }
11
11
 
12
+ export function verifyNativeUpdates(manifest, { projectId, channel }) {
13
+ const metadata = (name) => {
14
+ const tags = [...manifest.matchAll(/<meta-data\b[^>]*\/?\s*>/g)]
15
+ .map(([tag]) => tag)
16
+ .filter((tag) => tag.includes(`android:name="${name}"`));
17
+ if (tags.length !== 1) throw new Error(`Missing or duplicate ${name}`);
18
+ return /\bandroid:value="([^"]*)"/
19
+ .exec(tags[0])?.[1]
20
+ ?.replaceAll("&quot;", '"')
21
+ .replaceAll("&amp;", "&");
22
+ };
23
+ const prefix = "expo.modules.updates.";
24
+ if (
25
+ metadata(prefix + "ENABLED") !== "true" ||
26
+ metadata(prefix + "EXPO_UPDATE_URL") !==
27
+ `https://u.expo.dev/${projectId}` ||
28
+ metadata(prefix + "EXPO_RUNTIME_VERSION") !== "@string/expo_runtime_version"
29
+ )
30
+ throw new Error("Native update configuration mismatch");
31
+ let headers;
32
+ try {
33
+ headers = JSON.parse(
34
+ metadata(prefix + "UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY"),
35
+ );
36
+ } catch {
37
+ throw new Error("Invalid native update headers");
38
+ }
39
+ if (
40
+ JSON.stringify(headers) !== JSON.stringify({ "expo-channel-name": channel })
41
+ )
42
+ throw new Error("Native update channel mismatch");
43
+ }
44
+
12
45
  export function verifyBundle({
13
46
  bundle,
14
47
  packageId,
@@ -17,6 +50,7 @@ export function verifyBundle({
17
50
  expectedCert,
18
51
  bundletool,
19
52
  production = false,
53
+ updates,
20
54
  execute,
21
55
  }) {
22
56
  const run =
@@ -47,6 +81,20 @@ export function verifyBundle({
47
81
  ]);
48
82
  if (production && manifest.includes("e2e_network_security_config"))
49
83
  throw new Error("Bundle contains E2E network configuration");
84
+ if (updates) {
85
+ verifyNativeUpdates(manifest, updates);
86
+ const runtime = run("java", [
87
+ "-jar",
88
+ bundletool,
89
+ "dump",
90
+ "resources",
91
+ `--bundle=${bundle}`,
92
+ "--resource=string/expo_runtime_version",
93
+ "--values",
94
+ ]);
95
+ if (!/\(default\) - \[STR\] "file:fingerprint"/.test(runtime))
96
+ throw new Error("Native runtime must use the embedded fingerprint");
97
+ }
50
98
  const targetSdk = Number(
51
99
  /\bandroid:targetSdkVersion="(\d+)"/.exec(manifest)?.[1],
52
100
  );