create-disposabl-app 0.20.17 → 0.20.19

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 (32) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +3 -1
  3. package/dist/templates/default/.github/scripts/release.sh +33 -5
  4. package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
  5. package/dist/templates/default/apps/docs/content/mobile.mdx +2 -0
  6. package/dist/templates/default/apps/docs/content/publishing/apple.mdx +12 -0
  7. package/dist/templates/default/apps/docs/content/publishing/google-play.mdx +12 -0
  8. package/dist/templates/default/apps/docs/content/publishing/index.mdx +23 -0
  9. package/dist/templates/default/apps/mobile/package.json +1 -0
  10. package/dist/templates/default/apps/mobile/scripts/android-release-verify.mjs +51 -6
  11. package/dist/templates/default/apps/mobile/scripts/play-aab.mjs +4 -0
  12. package/dist/templates/default/apps/mobile/scripts/verify-play-aab.mjs +48 -0
  13. package/dist/templates/default/bun.lock +8 -0
  14. package/dist/templates/default/packages/disposabl-kit/PAYMENTS.md +2 -0
  15. package/dist/templates/default/packages/disposabl-kit/client/components/cookie-consent.tsx +117 -0
  16. package/dist/templates/default/packages/disposabl-kit/client/components/legal-page.tsx +15 -0
  17. package/dist/templates/default/packages/disposabl-kit/client/styles/cookie-consent.css +54 -0
  18. package/dist/templates/default/packages/disposabl-kit/mobile/billing/account-billing.tsx +168 -99
  19. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +9 -21
  20. package/dist/templates/default/packages/disposabl-kit/mobile/components/settings-page.tsx +52 -20
  21. package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +13 -4
  22. package/dist/templates/default/packages/disposabl-kit/package.json +7 -2
  23. package/dist/templates/default/packages/disposabl-kit/server/billing-functions.ts +15 -3
  24. package/dist/templates/default/packages/disposabl-kit/server/billing-native-capability.ts +33 -6
  25. package/dist/templates/default/packages/disposabl-kit/server/billing.ts +11 -3
  26. package/dist/templates/default/packages/tests/billing.test.ts +22 -0
  27. package/dist/templates/default/packages/tests/components/mobile-account-billing.test.mjs +149 -0
  28. package/dist/templates/default/packages/tests/ios-ota.test.ts +13 -10
  29. package/dist/templates/default/packages/tests/mobile-account-billing.test.ts +19 -0
  30. package/dist/templates/default/packages/tests/native-billing.test.ts +71 -0
  31. package/dist/templates/default/packages/tests/package-release.test.ts +37 -5
  32. 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.17";
6
+ var version = "0.20.19";
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.17";
1566
+ var version = "0.20.19";
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
  ];
@@ -12,15 +12,43 @@ name=$(node -p "require('./packages/$PACKAGE/package.json').name")
12
12
  node .github/scripts/disposabl.mjs report "$platform" building
13
13
  if GITHUB_TOKEN="$GH_TOKEN" npm_config_workspaces_update=false bun run --cwd "packages/$PACKAGE" release; then
14
14
  version=$(node -p "require('./packages/$PACKAGE/package.json').version")
15
- # semantic-release may succeed without a new release. Verify latest in that
16
- # case, but never require a public version before attempting OIDC publication.
15
+ # A no-op release must still verify the exact latest stable tag, not npm's
16
+ # possibly stale latest dist-tag (for example while a publish is scanning).
17
+ if [[ "$version" == *development* ]]; then
18
+ version=""
19
+ tags=$(git tag --merged HEAD --sort=-version:refname --list "$name@[0-9]*")
20
+ while IFS= read -r tag; do
21
+ candidate=${tag#"$name@"}
22
+ if [[ "$candidate" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
23
+ version=$candidate
24
+ break
25
+ fi
26
+ done <<< "$tags"
27
+ if [[ -z "$version" ]]; then
28
+ node .github/scripts/disposabl.mjs report "$platform" failed 'Release completed without a stable package tag to verify.'
29
+ exit 1
30
+ fi
31
+ fi
17
32
  published="$name@$version"
18
- [[ "$version" != *development* ]] || published=$name
19
- if ! PUBLISHED_VERSION=$(npm view "$published" version); then
33
+ # npm scans newly published packages before they become visible. Retry a
34
+ # bounded number of times, but never report ready without registry proof.
35
+ available=false
36
+ registry_deadline=$((SECONDS + 600))
37
+ for attempt in {1..61}; do
38
+ (( SECONDS < registry_deadline )) || break
39
+ if PUBLISHED_VERSION=$(npm view "$published" version --prefer-online --fetch-retries=0 --fetch-timeout=5000); then
40
+ available=true
41
+ break
42
+ fi
43
+ remaining=$((registry_deadline - SECONDS))
44
+ (( remaining > 0 )) || break
45
+ if (( attempt < 61 )); then sleep "$((remaining < 10 ? remaining : 10))"; fi
46
+ done
47
+ if [[ "$available" != true ]]; then
20
48
  node .github/scripts/disposabl.mjs report "$platform" failed 'Release finished, but npm availability could not be verified; check the registry lookup error.'
21
49
  exit 1
22
50
  fi
23
- if [[ -z "$PUBLISHED_VERSION" || ( "$published" != "$name" && "$PUBLISHED_VERSION" != "$version" ) ]]; then
51
+ if [[ -z "$PUBLISHED_VERSION" || "$PUBLISHED_VERSION" != "$version" ]]; then
24
52
  node .github/scripts/disposabl.mjs report "$platform" failed 'npm returned no matching published version.'
25
53
  exit 1
26
54
  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 }}",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: "${{ 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/).
@@ -33,6 +33,7 @@
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");
@@ -31,14 +38,17 @@ export function verifyInputs(config, manifest, env) {
31
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");
42
52
  if (env.ANDROID_PLAY_SUBMIT === "true") {
43
53
  for (const name of [
44
54
  "EXPO_PUBLIC_REVENUECAT_ANDROID_API_KEY",
@@ -77,6 +87,22 @@ export function verifyEmbedded(config, embedded) {
77
87
  ["version", embedded.android?.versionCode, config.android?.versionCode],
78
88
  ["scheme", embedded.scheme, config.scheme],
79
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
+ ],
80
106
  [
81
107
  "payments",
82
108
  embedded.extra?.disposablAndroidPayments,
@@ -109,6 +135,20 @@ if (
109
135
  execFileSync("unzip", ["-p", artifact, entry], { encoding: "utf8" }),
110
136
  );
111
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
+ }
112
152
  if (artifact.endsWith(".aab")) {
113
153
  if (!process.env.BUNDLETOOL_JAR)
114
154
  throw new Error("Bundletool is required for AAB validation");
@@ -120,6 +160,11 @@ if (
120
160
  expectedCert: cert.toUpperCase(),
121
161
  bundletool: process.env.BUNDLETOOL_JAR,
122
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,
123
168
  });
124
169
  }
125
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
  );
@@ -96,6 +96,7 @@
96
96
  "react-native": "0.88.1",
97
97
  "react-native-css": "3.1.0-rc.1",
98
98
  "react-native-gesture-handler": "~3.3.0",
99
+ "react-native-keyboard-controller": "1.22.7",
99
100
  "react-native-purchases": "10.16.0",
100
101
  "react-native-purchases-ui": "10.16.0",
101
102
  "react-native-reanimated": "4.7.1",
@@ -210,6 +211,7 @@
210
211
  "react-dom": "catalog:",
211
212
  "shadcn": "^4.23.0",
212
213
  "tw-animate-css": "^1.4.0",
214
+ "vanilla-cookieconsent": "3.1.0",
213
215
  },
214
216
  "devDependencies": {
215
217
  "@semantic-release/commit-analyzer": "13.0.1",
@@ -236,6 +238,7 @@
236
238
  "expo-web-browser": "~58.0.8",
237
239
  "react-native": "0.88.1",
238
240
  "react-native-css": "3.1.0-rc.1",
241
+ "react-native-keyboard-controller": "1.22.7",
239
242
  "react-native-purchases": "10.16.0",
240
243
  "react-native-purchases-ui": "10.16.0",
241
244
  "react-native-safe-area-context": "~5.11.1",
@@ -251,6 +254,7 @@
251
254
  "expo-web-browser",
252
255
  "react-native",
253
256
  "react-native-css",
257
+ "react-native-keyboard-controller",
254
258
  "react-native-purchases",
255
259
  "react-native-purchases-ui",
256
260
  "react-native-safe-area-context",
@@ -3212,6 +3216,8 @@
3212
3216
 
3213
3217
  "react-native-is-edge-to-edge": ["react-native-is-edge-to-edge@1.3.1", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-NIXU/iT5+ORyCc7p0z2nnlkouYKX425vuU1OEm6bMMtWWR9yvb+Xg5AZmImTKoF9abxCPqrKC3rOZsKzUYgYZA=="],
3214
3218
 
3219
+ "react-native-keyboard-controller": ["react-native-keyboard-controller@1.22.7", "", { "dependencies": { "react-native-is-edge-to-edge": "^1.2.1" }, "peerDependencies": { "react": "*", "react-native": "*", "react-native-reanimated": ">=3.0.0" } }, "sha512-IBR9z6Nl/iDLRfiv1zN9QQroOXAwYMugeAjVDb+CFbRBNC8fayXlHTBbshVcWc4j95Itsv+1/FgwfxKnIn1Vmg=="],
3220
+
3215
3221
  "react-native-purchases": ["react-native-purchases@10.16.0", "", { "dependencies": { "@revenuecat/purchases-js-hybrid-mappings": "19.17.0", "@revenuecat/purchases-typescript-internal": "19.17.0" }, "peerDependencies": { "react": ">= 16.6.3", "react-native": ">= 0.73.0", "react-native-web": "*" }, "optionalPeers": ["react-native-web"] }, "sha512-Rcoy4A7uaaY4Fbgw6aaw5ummkyMPZuA/T1bC7IKHIQCxqoNo/L75PxzZ/8mEMpjhisbHERWl1mXmt0KTfllcDg=="],
3216
3222
 
3217
3223
  "react-native-purchases-ui": ["react-native-purchases-ui@10.16.0", "", { "dependencies": { "@revenuecat/purchases-typescript-internal": "19.17.0" }, "peerDependencies": { "react": "*", "react-native": ">= 0.73.0", "react-native-purchases": "10.16.0", "react-native-web": "*" }, "optionalPeers": ["react-native-web"] }, "sha512-IX0rdegsj590P8FKqx72fYzlsNN0U3tVv8T/pWf4xNCE462xtzVQQ0IjmdVs4Pyq6UwEgehDy1DwATKOhDGvRw=="],
@@ -3708,6 +3714,8 @@
3708
3714
 
3709
3715
  "validate-npm-package-name": ["validate-npm-package-name@7.0.2", "", {}, "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A=="],
3710
3716
 
3717
+ "vanilla-cookieconsent": ["vanilla-cookieconsent@3.1.0", "", {}, "sha512-/McNRtm/3IXzb9dhqMIcbquoU45SzbN2VB+To4jxEPqMmp7uVniP6BhGLjU8MC7ZCDsNQVOp27fhQTM/ruIXAA=="],
3718
+
3711
3719
  "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="],
3712
3720
 
3713
3721
  "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],
@@ -93,3 +93,5 @@ Native SDK is pinned to `react-native-purchases` 10.16.0 because its required `P
93
93
  ### Store reviewer sandbox purchases
94
94
 
95
95
  Production deployments may explicitly set `REVENUECAT_REVIEWER_USERS` to a JSON array of exact app user IDs (maximum 20) to accept authenticated RevenueCat `SANDBOX` purchase events for those accounts on the existing allowlisted app, store and product routes. The setting is absent by default. Only those users' sandbox purchases can grant their live Autumn balance; do not add ordinary users. The regular production purchase route and managed monthly integration are unchanged. Configure RevenueCat separately to send sandbox webhooks using the authenticated endpoint; sandbox transfers and other accounts are rejected. A sandbox monthly initial purchase or renewal grants the configured monthly credits until the event's `expiration_at_ms`; a top-up grants the configured non-expiring top-up credits. Normal monthly cancellation does not revoke the current grant; a reported refund follows the existing operator-review flow. Unknown outcomes remain held for reconciliation. Remove the allowlist when review is complete and reconcile any remaining sandbox grants and pending events; changes cannot cancel an already dispatched provider request. These controls do not prove delivery or billing provider behavior. Verify the exact reviewer account and a real sandbox transaction through the webhook, balance and product usage before submission.
96
+
97
+ Before public launch, the same server-side reviewer allowlist can expose native subscription readiness and the configured top-up routes to that authenticated account for store sandbox qualification, without setting the global verification or sync flags. It does not expose a different purchase UI or accept a client-supplied account ID. Confirm real store receipts, webhook processing and usable credit balances before enabling the global flags; public submission requires those capabilities to be available to ordinary users under the same conditions. Remove the temporary allowlist after qualification and reconcile outstanding sandbox grants.