create-disposabl-app 0.20.15 → 0.20.17

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 (44) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/templates/default/.github/scripts/apple.sh +9 -0
  4. package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
  5. package/dist/templates/default/apps/mobile/eas.json +2 -0
  6. package/dist/templates/default/apps/mobile/package.json +14 -14
  7. package/dist/templates/default/apps/mobile/scripts/android-release-verify.mjs +11 -1
  8. package/dist/templates/default/bun.lock +103 -169
  9. package/dist/templates/default/disposabl.json +1 -1
  10. package/dist/templates/default/package.json +6 -6
  11. package/dist/templates/default/packages/backend/convex/authEmail.ts +1 -1
  12. package/dist/templates/default/packages/backend/convex/convex.config.ts +1 -0
  13. package/dist/templates/default/packages/backend/convex/users/internal.ts +13 -16
  14. package/dist/templates/default/packages/disposabl-kit/PAYMENTS.md +6 -0
  15. package/dist/templates/default/packages/disposabl-kit/client/components/google-sign-in.tsx +0 -2
  16. package/dist/templates/default/packages/disposabl-kit/client/components/legal-page.tsx +4 -1
  17. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/verify-email.tsx +4 -2
  18. package/dist/templates/default/packages/disposabl-kit/client/routes/pricing.tsx +18 -4
  19. package/dist/templates/default/packages/disposabl-kit/legal/config.ts +10 -7
  20. package/dist/templates/default/packages/disposabl-kit/legal/documents/privacy.ts +3 -1
  21. package/dist/templates/default/packages/disposabl-kit/legal/index.ts +2 -1
  22. package/dist/templates/default/packages/disposabl-kit/legal/publisher.ts +5 -1
  23. package/dist/templates/default/packages/disposabl-kit/legal/types.ts +18 -0
  24. package/dist/templates/default/packages/disposabl-kit/lib/auth-errors.ts +2 -0
  25. package/dist/templates/default/packages/disposabl-kit/mobile/components/email-verification.tsx +4 -2
  26. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-errors.ts +2 -0
  27. package/dist/templates/default/packages/disposabl-kit/package.json +7 -7
  28. package/dist/templates/default/packages/disposabl-kit/payments/catalog.ts +6 -0
  29. package/dist/templates/default/packages/disposabl-kit/payments/config.ts +5 -3
  30. package/dist/templates/default/packages/disposabl-kit/server/revenuecat-contract.ts +87 -8
  31. package/dist/templates/default/packages/disposabl-kit/server/revenuecat-functions.ts +34 -8
  32. package/dist/templates/default/packages/disposabl-kit/server/revenuecat-validator.ts +3 -0
  33. package/dist/templates/default/packages/tests/billing-setup.test.ts +14 -14
  34. package/dist/templates/default/packages/tests/flows/email-delivery.e2e.ts +1 -1
  35. package/dist/templates/default/packages/tests/flows/legal.e2e.ts +7 -5
  36. package/dist/templates/default/packages/tests/flows/password-backend.e2e.ts +1 -1
  37. package/dist/templates/default/packages/tests/helpers/auth-email-setup/probe.test.mjs +1 -1
  38. package/dist/templates/default/packages/tests/ios-ota.test.ts +19 -0
  39. package/dist/templates/default/packages/tests/revenuecat-inbox.test.ts +91 -3
  40. package/dist/templates/default/patches/expo-modules-core@58.1.0.patch +23 -0
  41. package/dist/templates/default/vendor/README.md +4 -10
  42. package/dist/templates/default/vendor/convex-auth-2.0.0-disposabl.2.patch +2096 -0
  43. package/dist/templates/default/vendor/convex-auth-2.0.0-disposabl.2.tgz +0 -0
  44. 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.15";
6
+ var version = "0.20.17";
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.15";
1566
+ var version = "0.20.17";
1567
1567
 
1568
1568
  // ../cli/telemetry.ts
1569
1569
  var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
@@ -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" \
@@ -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: "${{ 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}]}}}
@@ -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,28 +6,28 @@
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",
@@ -28,7 +28,7 @@ export function verifyInputs(config, manifest, env) {
28
28
  if (env.GH_REPO === "disposabl-dev/create-disposabl-app") {
29
29
  if (
30
30
  config.android?.package !== "com.yastai.disposabl" ||
31
- config.extra?.disposablAndroidPayments !== false ||
31
+ config.extra?.disposablAndroidPayments !== true ||
32
32
  JSON.stringify(abis) !== JSON.stringify(["arm64-v8a", "x86_64"]) ||
33
33
  env.EXPO_PUBLIC_DISPOSABL_ANALYTICS_ENABLED !== "true" ||
34
34
  env.UPDATE_POLICY !== "disabled" ||
@@ -39,6 +39,16 @@ export function verifyInputs(config, manifest, env) {
39
39
  // That identity never enables OTA: URL, headers and enabled are checked.
40
40
  if (config.extra?.eas?.projectId !== manifest.projectId)
41
41
  throw new Error("Disposabl Expo project identity mismatch");
42
+ if (env.ANDROID_PLAY_SUBMIT === "true") {
43
+ for (const name of [
44
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_API_KEY",
45
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_MONTHLY_PRODUCT",
46
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_APP_ID",
47
+ "EXPO_PUBLIC_REVENUECAT_ANDROID_TOPUP_PRODUCT",
48
+ ]) {
49
+ if (!env[name]?.trim()) throw new Error(`Missing ${name}`);
50
+ }
51
+ }
42
52
  }
43
53
  if (env.EXPO_PUBLIC_E2E === "true")
44
54
  throw new Error("E2E is not permitted in production");