kasy-cli 1.31.6 → 1.31.7

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.
@@ -389,12 +389,18 @@ module.exports = {
389
389
  'cli.command.ios.help.before': 'How to publish to the App Store:\n 1) kasy ios configure → do this once (saves Apple credentials)\n 2) kasy ios release → run for each new version (build + upload)\n\nUse "build" to only generate the IPA, "clean" if a build fails.\n',
390
390
  'cli.command.codemagic.description': 'Build the app in the cloud (no Mac needed)',
391
391
  'cli.command.codemagic.configure.description': 'Configure Codemagic API credentials',
392
- 'cli.command.codemagic.release.description': 'Start a Codemagic iOS workflow build',
392
+ 'cli.command.codemagic.release.description': 'Start a cloud build (iOS, Android, or both)',
393
+ 'cli.command.codemagic.release.iosOption': 'Build only iOS',
394
+ 'cli.command.codemagic.release.androidOption': 'Build only Android',
395
+ 'cli.command.codemagic.release.platformPick': 'Which platform do you want to build?',
396
+ 'cli.command.codemagic.release.platform.both': 'iOS + Android',
397
+ 'cli.command.codemagic.release.platform.ios': 'iOS only',
398
+ 'cli.command.codemagic.release.platform.android': 'Android only',
393
399
  'cli.command.codemagic.status.description': 'Show Codemagic build status by ID',
394
400
  'cli.command.codemagic.picker.intro': 'Build in the cloud with Codemagic',
395
401
  'cli.command.codemagic.picker.message': 'What do you want to do?',
396
402
  'cli.command.codemagic.picker.statusHint': 'Asks for the build ID',
397
- 'cli.command.codemagic.help.before': 'How to build with Codemagic (no Mac needed):\n 1) kasy codemagic configure → do this once (saves API token)\n 2) kasy codemagic release → starts a cloud build for each version\n\nUse "status <buildId>" to check the progress of a running build.\n',
403
+ 'cli.command.codemagic.help.before': 'How to build with Codemagic (no Mac needed):\n 1) kasy codemagic configure → do this once (saves API token + app)\n 2) kasy codemagic release → cloud build for each version\n kasy codemagic release --ios (iOS only)\n kasy codemagic release --android (Android only)\n\nUse "status <buildId>" to check the progress of a running build.\n',
398
404
 
399
405
  'ios.configure.title': 'iOS App Store — setup',
400
406
  'ios.configure.bundleId': 'Bundle ID',
@@ -456,19 +462,24 @@ module.exports = {
456
462
  'codemagic.configure.title': 'Codemagic — setup',
457
463
  'codemagic.configure.doc': 'Guide',
458
464
  'codemagic.configure.checklist': 'Complete signing + App Store Connect in the Codemagic dashboard (see guide).',
459
- 'codemagic.configure.openingLinks': 'Opening Codemagic in your browser…',
465
+ 'codemagic.configure.openingToken': 'Opening Codemagic settings — copy your API token…',
460
466
  'codemagic.configure.q.token': 'Codemagic API token',
461
467
  'codemagic.configure.q.appId': 'Codemagic App ID',
462
- 'codemagic.configure.q.workflowId': 'Workflow ID (from codemagic.yaml)',
463
468
  'codemagic.configure.q.branch': 'Git branch to build',
464
469
  'codemagic.configure.q.required': 'Required',
470
+ 'codemagic.configure.validating': 'Checking token and loading your apps…',
471
+ 'codemagic.configure.validated': 'Token OK',
472
+ 'codemagic.configure.tokenInvalid': 'Could not validate the token',
473
+ 'codemagic.configure.noApps': 'No apps found on this account. Connect your repository in the Codemagic dashboard first.',
474
+ 'codemagic.configure.pickApp': 'Which app do you want to build?',
465
475
  'codemagic.configure.cancelled': 'Setup cancelled',
466
476
  'codemagic.configure.success': 'Codemagic credentials saved',
467
477
  'codemagic.configure.next': 'Next',
468
478
  'codemagic.release.title': 'Triggering Codemagic build…',
469
- 'codemagic.release.triggered': 'Build started',
470
- 'codemagic.release.spin': 'Starting build on Codemagic',
471
- 'codemagic.release.spinDone': 'Build queued on Codemagic',
479
+ 'codemagic.release.spinPlatform': 'Starting {platform} build on Codemagic…',
480
+ 'codemagic.release.triggeredPlatform': '{platform} build queued on Codemagic',
481
+ 'codemagic.release.noIosKey': 'No iOS production RevenueCat key (RC_IOS_PROD_KEY) in .env — subscriptions may not load in the build.',
482
+ 'codemagic.release.noAndroidKey': 'No Android production RevenueCat key (RC_ANDROID_PROD_KEY) in .env — subscriptions may not load in the build.',
472
483
  'codemagic.status.title': 'Build status',
473
484
  'codemagic.status.usage': 'Usage: kasy codemagic status <buildId>',
474
485
  'codemagic.status.spin': 'Fetching build status…',
@@ -391,12 +391,18 @@ module.exports = {
391
391
  'cli.command.ios.help.before': 'Cómo publicar en la App Store:\n 1) kasy ios configure → hazlo una vez (guarda las credenciales Apple)\n 2) kasy ios release → ejecuta en cada nueva versión (build + subida)\n\nUsa "build" si solo quieres generar el IPA, "clean" si un build falló.\n',
392
392
  'cli.command.codemagic.description': 'Compila la app en la nube (sin necesitar Mac)',
393
393
  'cli.command.codemagic.configure.description': 'Configurar credenciales API de Codemagic',
394
- 'cli.command.codemagic.release.description': 'Iniciar build del workflow iOS en Codemagic',
394
+ 'cli.command.codemagic.release.description': 'Iniciar build en la nube (iOS, Android o ambos)',
395
+ 'cli.command.codemagic.release.iosOption': 'Compilar solo iOS',
396
+ 'cli.command.codemagic.release.androidOption': 'Compilar solo Android',
397
+ 'cli.command.codemagic.release.platformPick': '¿Qué plataforma quieres compilar?',
398
+ 'cli.command.codemagic.release.platform.both': 'iOS + Android',
399
+ 'cli.command.codemagic.release.platform.ios': 'Solo iOS',
400
+ 'cli.command.codemagic.release.platform.android': 'Solo Android',
395
401
  'cli.command.codemagic.status.description': 'Estado del build Codemagic por ID',
396
402
  'cli.command.codemagic.picker.intro': 'Compilar en la nube con Codemagic',
397
403
  'cli.command.codemagic.picker.message': '¿Qué quieres hacer?',
398
404
  'cli.command.codemagic.picker.statusHint': 'Pregunta el ID del build',
399
- 'cli.command.codemagic.help.before': 'Cómo compilar con Codemagic (sin necesitar Mac):\n 1) kasy codemagic configure → hazlo una vez (guarda el token de la API)\n 2) kasy codemagic release → inicia un build en la nube por versión\n\nUsa "status <buildId>" para seguir el progreso de un build.\n',
405
+ 'cli.command.codemagic.help.before': 'Cómo compilar con Codemagic (sin necesitar Mac):\n 1) kasy codemagic configure → hazlo una vez (guarda el token de la API + app)\n 2) kasy codemagic release → build en la nube por versión\n kasy codemagic release --ios (solo iOS)\n kasy codemagic release --android (solo Android)\n\nUsa "status <buildId>" para seguir el progreso de un build.\n',
400
406
 
401
407
  'ios.configure.title': 'App Store iOS — configuración',
402
408
  'ios.configure.bundleId': 'Bundle ID',
@@ -458,19 +464,24 @@ module.exports = {
458
464
  'codemagic.configure.title': 'Codemagic — configuración',
459
465
  'codemagic.configure.doc': 'Guía',
460
466
  'codemagic.configure.checklist': 'Complete firma + App Store Connect en el panel Codemagic (vea la guía).',
461
- 'codemagic.configure.openingLinks': 'Abriendo Codemagic en el navegador…',
467
+ 'codemagic.configure.openingToken': 'Abriendo la configuración de Codemagic copia tu token de la API…',
462
468
  'codemagic.configure.q.token': 'Token API de Codemagic',
463
469
  'codemagic.configure.q.appId': 'App ID en Codemagic',
464
- 'codemagic.configure.q.workflowId': 'Workflow ID (de codemagic.yaml)',
465
470
  'codemagic.configure.q.branch': 'Rama Git para build',
466
471
  'codemagic.configure.q.required': 'Obligatorio',
472
+ 'codemagic.configure.validating': 'Verificando el token y cargando tus apps…',
473
+ 'codemagic.configure.validated': 'Token válido',
474
+ 'codemagic.configure.tokenInvalid': 'No se pudo validar el token',
475
+ 'codemagic.configure.noApps': 'No se encontraron apps en esta cuenta. Conecta tu repositorio en el panel de Codemagic primero.',
476
+ 'codemagic.configure.pickApp': '¿Qué app quieres compilar?',
467
477
  'codemagic.configure.cancelled': 'Configuración cancelada',
468
478
  'codemagic.configure.success': 'Credenciales Codemagic guardadas',
469
479
  'codemagic.configure.next': 'Siguiente paso',
470
480
  'codemagic.release.title': 'Disparando build en Codemagic…',
471
- 'codemagic.release.triggered': 'Build iniciado',
472
- 'codemagic.release.spin': 'Iniciando build en Codemagic',
473
- 'codemagic.release.spinDone': 'Build encolado en Codemagic',
481
+ 'codemagic.release.spinPlatform': 'Iniciando build de {platform} en Codemagic…',
482
+ 'codemagic.release.triggeredPlatform': 'Build de {platform} encolado en Codemagic',
483
+ 'codemagic.release.noIosKey': 'Sin clave de producción iOS de RevenueCat (RC_IOS_PROD_KEY) en .env — las suscripciones pueden no cargar en el build.',
484
+ 'codemagic.release.noAndroidKey': 'Sin clave de producción Android de RevenueCat (RC_ANDROID_PROD_KEY) en .env — las suscripciones pueden no cargar en el build.',
474
485
  'codemagic.status.title': 'Estado del build',
475
486
  'codemagic.status.usage': 'Uso: kasy codemagic status <buildId>',
476
487
  'codemagic.status.spin': 'Consultando estado del build…',
@@ -389,12 +389,18 @@ module.exports = {
389
389
  'cli.command.ios.help.before': 'Como publicar na App Store:\n 1) kasy ios configure → faça isso uma vez (salva as credenciais Apple)\n 2) kasy ios release → rode em cada nova versão (build + envio)\n\nUse "build" se quiser só gerar o IPA, "clean" se um build falhou.\n',
390
390
  'cli.command.codemagic.description': 'Compila o app na nuvem (sem precisar de Mac)',
391
391
  'cli.command.codemagic.configure.description': 'Configurar credenciais da API Codemagic',
392
- 'cli.command.codemagic.release.description': 'Iniciar build do workflow iOS no Codemagic',
392
+ 'cli.command.codemagic.release.description': 'Iniciar build na nuvem (iOS, Android ou os dois)',
393
+ 'cli.command.codemagic.release.iosOption': 'Compilar só o iOS',
394
+ 'cli.command.codemagic.release.androidOption': 'Compilar só o Android',
395
+ 'cli.command.codemagic.release.platformPick': 'Qual plataforma você quer compilar?',
396
+ 'cli.command.codemagic.release.platform.both': 'iOS + Android',
397
+ 'cli.command.codemagic.release.platform.ios': 'Só iOS',
398
+ 'cli.command.codemagic.release.platform.android': 'Só Android',
393
399
  'cli.command.codemagic.status.description': 'Status do build Codemagic por ID',
394
400
  'cli.command.codemagic.picker.intro': 'Compilar na nuvem com Codemagic',
395
401
  'cli.command.codemagic.picker.message': 'O que você quer fazer?',
396
402
  'cli.command.codemagic.picker.statusHint': 'Pergunta o ID do build',
397
- 'cli.command.codemagic.help.before': 'Como compilar com Codemagic (sem precisar de Mac):\n 1) kasy codemagic configure → faça isso uma vez (salva o token da API)\n 2) kasy codemagic release → inicia um build na nuvem a cada versão\n\nUse "status <buildId>" para acompanhar o progresso de um build.\n',
403
+ 'cli.command.codemagic.help.before': 'Como compilar com Codemagic (sem precisar de Mac):\n 1) kasy codemagic configure → faça isso uma vez (salva o token da API + app)\n 2) kasy codemagic release → build na nuvem a cada versão\n kasy codemagic release --ios (só iOS)\n kasy codemagic release --android (só Android)\n\nUse "status <buildId>" para acompanhar o progresso de um build.\n',
398
404
 
399
405
  'ios.configure.title': 'App Store iOS — configuração',
400
406
  'ios.configure.bundleId': 'Bundle ID',
@@ -456,19 +462,24 @@ module.exports = {
456
462
  'codemagic.configure.title': 'Codemagic — configuração',
457
463
  'codemagic.configure.doc': 'Guia',
458
464
  'codemagic.configure.checklist': 'Conclua assinatura + App Store Connect no painel Codemagic (veja o guia).',
459
- 'codemagic.configure.openingLinks': 'Abrindo Codemagic no navegador…',
465
+ 'codemagic.configure.openingToken': 'Abrindo as configurações do Codemagic copie o token da API…',
460
466
  'codemagic.configure.q.token': 'Token da API Codemagic',
461
467
  'codemagic.configure.q.appId': 'App ID no Codemagic',
462
- 'codemagic.configure.q.workflowId': 'Workflow ID (do codemagic.yaml)',
463
468
  'codemagic.configure.q.branch': 'Branch Git para build',
464
469
  'codemagic.configure.q.required': 'Obrigatório',
470
+ 'codemagic.configure.validating': 'Verificando o token e carregando seus apps…',
471
+ 'codemagic.configure.validated': 'Token válido',
472
+ 'codemagic.configure.tokenInvalid': 'Não foi possível validar o token',
473
+ 'codemagic.configure.noApps': 'Nenhum app encontrado nesta conta. Conecte seu repositório no painel do Codemagic primeiro.',
474
+ 'codemagic.configure.pickApp': 'Qual app você quer compilar?',
465
475
  'codemagic.configure.cancelled': 'Configuração cancelada',
466
476
  'codemagic.configure.success': 'Credenciais Codemagic salvas',
467
477
  'codemagic.configure.next': 'Próximo passo',
468
478
  'codemagic.release.title': 'Disparando build no Codemagic…',
469
- 'codemagic.release.triggered': 'Build iniciado',
470
- 'codemagic.release.spin': 'Iniciando build no Codemagic',
471
- 'codemagic.release.spinDone': 'Build enfileirado no Codemagic',
479
+ 'codemagic.release.spinPlatform': 'Iniciando build de {platform} no Codemagic…',
480
+ 'codemagic.release.triggeredPlatform': 'Build de {platform} enfileirado no Codemagic',
481
+ 'codemagic.release.noIosKey': 'Sem chave de produção iOS do RevenueCat (RC_IOS_PROD_KEY) no .env — as assinaturas podem não carregar no build.',
482
+ 'codemagic.release.noAndroidKey': 'Sem chave de produção Android do RevenueCat (RC_ANDROID_PROD_KEY) no .env — as assinaturas podem não carregar no build.',
472
483
  'codemagic.status.title': 'Status do build',
473
484
  'codemagic.status.usage': 'Uso: kasy codemagic status <buildId>',
474
485
  'codemagic.status.spin': 'Consultando status do build…',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kasy-cli",
3
- "version": "1.31.6",
3
+ "version": "1.31.7",
4
4
  "description": "CLI for scaffolding production-ready Flutter SaaS apps with Firebase, Supabase, or API REST backends.",
5
5
  "bin": {
6
6
  "kasy": "./bin/kasy.js"
@@ -0,0 +1,213 @@
1
+ # Codemagic CI/CD — shipped by the Kasy `ci` feature.
2
+ #
3
+ # iOS and Android run as SEPARATE workflows (ios-workflow / android-workflow),
4
+ # so you can build and publish each platform on its own. `kasy codemagic release`
5
+ # triggers them: `--ios`, `--android`, or both.
6
+ #
7
+ # App keys (RevenueCat, backend URL, Sentry, Mixpanel, App Store id) arrive as
8
+ # ENVIRONMENT VARIABLES, two ways:
9
+ # 1. `kasy codemagic release` injects them automatically from your local .env, or
10
+ # 2. you store them in the Codemagic UI as variable groups.
11
+ # The "Generate .env" step below rebuilds the app's .env asset from those vars,
12
+ # so the build always has the production RevenueCat keys (appl_/goog_) — never
13
+ # the test_ key. ENV=prod is also passed as a dart-define (compile-time const).
14
+ #
15
+ # What you still set up ONCE in the Codemagic dashboard (UI-only, by design):
16
+ # - Connect your Git repository (Add application)
17
+ # - iOS: App Store Connect integration (the Apple API key)
18
+ # - Android: upload the keystore + the Google Play service account JSON
19
+
20
+ workflows:
21
+ android-workflow:
22
+ name: Android Workflow
23
+ instance_type: mac_mini_m1
24
+ max_build_duration: 120
25
+ environment:
26
+ android_signing:
27
+ - keystore_reference # <-- Reference name of the keystore you upload in the Codemagic UI
28
+ groups:
29
+ - google_play # <-- Group holding GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS (and any app keys)
30
+ vars:
31
+ PACKAGE_NAME: com.aicrus.firebase.kit # <-- Your Android applicationId
32
+ GOOGLE_PLAY_TRACK: "internal" # <-- internal | alpha | beta | production
33
+ flutter: stable
34
+ triggering:
35
+ cancel_previous_builds: true
36
+ events:
37
+ - push
38
+ branch_patterns:
39
+ - pattern: '*'
40
+ include: false
41
+ source: false
42
+ - pattern: 'main'
43
+ include: true
44
+ source: true
45
+ scripts:
46
+ - name: Set up local.properties
47
+ script: |
48
+ echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/android/local.properties"
49
+ - name: Get Flutter packages
50
+ script: |
51
+ flutter packages pub get
52
+ - name: Generate .env from build environment
53
+ script: |
54
+ # The app reads its config from a bundled .env asset at runtime. That
55
+ # file is gitignored (never in the repo), so recreate it here from the
56
+ # environment variables provided by `kasy codemagic release` or by a
57
+ # Codemagic variable group. In a release build the app uses the
58
+ # production RevenueCat key (appl_/goog_) from RC_*_PROD_KEY.
59
+ cat > "$CM_BUILD_DIR/.env" <<EOF
60
+ ENV=prod
61
+ BACKEND_URL=${BACKEND_URL:-}
62
+ AI_CHAT_ENDPOINT=${AI_CHAT_ENDPOINT:-}
63
+ RC_TEST_KEY=${RC_TEST_KEY:-}
64
+ RC_IOS_PROD_KEY=${RC_IOS_PROD_KEY:-}
65
+ RC_ANDROID_PROD_KEY=${RC_ANDROID_PROD_KEY:-}
66
+ MIXPANEL_TOKEN=${MIXPANEL_TOKEN:-}
67
+ SENTRY_DSN=${SENTRY_DSN:-}
68
+ APP_STORE_ID=${APP_STORE_ID:-}
69
+ EOF
70
+ - name: Unit tests
71
+ script: |
72
+ mkdir -p test-results
73
+ flutter test --machine > test-results/flutter.json
74
+ test_report: test-results/flutter.json
75
+ - name: Build AAB with Flutter
76
+ script: |
77
+ BUILD_NUMBER=$(($(google-play get-latest-build-number --package-name "$PACKAGE_NAME" --tracks="$GOOGLE_PLAY_TRACK") + 1))
78
+ flutter build appbundle --release \
79
+ --dart-define=ENV=prod \
80
+ --build-name=1.0.$BUILD_NUMBER \
81
+ --build-number=$BUILD_NUMBER
82
+ artifacts:
83
+ - build/**/outputs/**/*.aab
84
+ - build/**/outputs/**/mapping.txt
85
+ - flutter_drive.log
86
+ publishing:
87
+ email:
88
+ recipients:
89
+ - # <-- Put your email here or add others recipients
90
+ notify:
91
+ success: true
92
+ failure: true
93
+ google_play:
94
+ credentials: $GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS
95
+ track: $GOOGLE_PLAY_TRACK
96
+ submit_as_draft: true
97
+ ios-workflow:
98
+ name: iOS Workflow
99
+ instance_type: mac_mini_m1
100
+ max_build_duration: 120
101
+ integrations:
102
+ app_store_connect: codemagic # <-- Name of your App Store Connect integration (Codemagic UI)
103
+ environment:
104
+ groups:
105
+ - appstore_credentials # <-- Group holding APP_ID (and any app keys)
106
+ ios_signing:
107
+ distribution_type: app_store
108
+ bundle_identifier: com.aicrus.firebase.kit # <-- Your iOS bundle identifier
109
+ vars:
110
+ # APP_ID = the numeric App Store Connect app id. `kasy codemagic release`
111
+ # sends it automatically (read from APP_STORE_ID in your .env); or define
112
+ # it in the appstore_credentials group.
113
+ APP_ID: $APP_ID
114
+ flutter: stable
115
+ xcode: latest # <-- set to specific version e.g. 15.0 to avoid unexpected updates.
116
+ cocoapods: default
117
+ triggering:
118
+ cancel_previous_builds: true
119
+ events:
120
+ - push
121
+ branch_patterns:
122
+ - pattern: '*'
123
+ include: false
124
+ source: false
125
+ - pattern: 'main'
126
+ include: true
127
+ source: true
128
+ scripts:
129
+ - name: Set up code signing settings on Xcode project
130
+ script: |
131
+ xcode-project use-profiles
132
+ - name: Get Flutter packages
133
+ script: |
134
+ flutter packages pub get
135
+ - name: Install pods
136
+ script: |
137
+ find . -name "Podfile" -execdir pod install \;
138
+ - name: Validate Google Sign-In iOS URL scheme
139
+ script: |
140
+ GOOGLE_PLIST="ios/Runner/GoogleService-Info.plist"
141
+ INFO_PLIST="ios/Runner/Info.plist"
142
+ if [ -f "$GOOGLE_PLIST" ]; then
143
+ REVERSED_CLIENT_ID=$(/usr/libexec/PlistBuddy -c "Print :REVERSED_CLIENT_ID" "$GOOGLE_PLIST" 2>/dev/null || true)
144
+ if [ -z "$REVERSED_CLIENT_ID" ]; then
145
+ echo "REVERSED_CLIENT_ID not found in $GOOGLE_PLIST"
146
+ exit 1
147
+ fi
148
+ if ! /usr/libexec/PlistBuddy -c "Print :CFBundleURLTypes" "$INFO_PLIST" 2>/dev/null | grep -Fq "$REVERSED_CLIENT_ID"; then
149
+ echo "Google Sign-In iOS URL scheme mismatch."
150
+ echo "Expected CFBundleURLSchemes to include: $REVERSED_CLIENT_ID"
151
+ echo "Run flutterfire configure/project setup before building."
152
+ exit 1
153
+ fi
154
+ fi
155
+ - name: Generate .env from build environment
156
+ script: |
157
+ # See the Android workflow note above — recreate the bundled .env asset
158
+ # from environment variables so the release build gets the production
159
+ # RevenueCat key (appl_) instead of the test_ key.
160
+ cat > "$CM_BUILD_DIR/.env" <<EOF
161
+ ENV=prod
162
+ BACKEND_URL=${BACKEND_URL:-}
163
+ AI_CHAT_ENDPOINT=${AI_CHAT_ENDPOINT:-}
164
+ RC_TEST_KEY=${RC_TEST_KEY:-}
165
+ RC_IOS_PROD_KEY=${RC_IOS_PROD_KEY:-}
166
+ RC_ANDROID_PROD_KEY=${RC_ANDROID_PROD_KEY:-}
167
+ MIXPANEL_TOKEN=${MIXPANEL_TOKEN:-}
168
+ SENTRY_DSN=${SENTRY_DSN:-}
169
+ APP_STORE_ID=${APP_STORE_ID:-}
170
+ EOF
171
+ - name: Flutter analyze # <-- remove if you don't like flutter analyze
172
+ script: |
173
+ flutter analyze
174
+ - name: Flutter unit tests
175
+ script: |
176
+ flutter test
177
+ ignore_failure: false # You should never build an app that has failing tests.
178
+ - name: Flutter build ipa and automatic versioning
179
+ script: |
180
+ flutter build ipa --release \
181
+ --dart-define=ENV=prod \
182
+ --build-name=1.0.0 \
183
+ --build-number=$(($(app-store-connect get-latest-app-store-build-number "$APP_ID") + 1)) \
184
+ --export-options-plist=/Users/builder/export_options.plist
185
+ artifacts:
186
+ - build/ios/ipa/*.ipa
187
+ - /tmp/xcodebuild_logs/*.log
188
+ - flutter_drive.log
189
+ publishing:
190
+ # See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email
191
+ email:
192
+ recipients:
193
+ - # <-- Put your email here or add others recipients
194
+ notify:
195
+ success: true
196
+ failure: true
197
+ app_store_connect:
198
+ # Use codemagic integration (easier)
199
+ auth: integration
200
+ # ====================================
201
+ ## Or push all keys manually here
202
+ ## ====================================
203
+ #api_key: $APP_STORE_CONNECT_PRIVATE_KEY
204
+ #key_id: $APP_STORE_CONNECT_KEY_IDENTIFIER
205
+ #issuer_id: $APP_STORE_CONNECT_ISSUER_ID
206
+ ## ====================================
207
+ submit_to_app_store: false # Set true to send to App Store review automatically
208
+ release_type: MANUAL
209
+ # Configuration related to TestFlight (optional)
210
+ # Note: This action is performed during post-processing.
211
+ submit_to_testflight: true
212
+ beta_groups: # Specify the names of beta tester groups that will get access to the build once it has passed beta review.
213
+ - kasy # <-- Put your beta group name here
@@ -1,43 +1,64 @@
1
- # Publish iOS with Codemagic (no Mac)
1
+ # Publish to the cloud with Codemagic (no Mac)
2
+
3
+ Publishes **iOS** and **Android** through the Codemagic cloud. Each platform has
4
+ its own workflow, so you can ship them separately or both together.
2
5
 
3
6
  ## Prerequisites
4
7
 
5
- - [Codemagic](https://codemagic.io) account
6
- - Git repository connected to Codemagic
7
- - Apple Developer account + app in App Store Connect
8
+ - A [Codemagic](https://codemagic.io) account
9
+ - A Git repository connected to Codemagic
10
+ - iOS: Apple Developer account + app in App Store Connect
11
+ - Android: app in Google Play Console + a signing keystore
8
12
 
9
- ## 1. Add CI to the project (if missing)
13
+ ## 1. Add CI to the project (if you don't have it yet)
10
14
 
11
15
  ```bash
12
16
  kasy add ci
13
17
  ```
14
18
 
15
- Creates `codemagic.yaml` at the project root.
19
+ This creates `codemagic.yaml` at the project root (`ios-workflow` and
20
+ `android-workflow`).
21
+
22
+ ## 2. Set up in the Codemagic dashboard (once)
23
+
24
+ These are secrets and can only be done in the dashboard — one time:
16
25
 
17
- ## 2. Configure in the Codemagic dashboard
26
+ 1. Open [codemagic.io/apps](https://codemagic.io/apps) and **connect your repository**.
27
+ 2. **iOS** — *Integrations → App Store Connect*: connect the Apple API key. Its
28
+ name goes in `integrations: app_store_connect:` in `codemagic.yaml`.
29
+ 3. **Android** — *Code signing identities → Android keystores*: upload the
30
+ keystore with **Reference name** `keystore_reference` (matching `codemagic.yaml`).
31
+ 4. **Android** — upload the **Google Play service account** JSON as the secret
32
+ variable `GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS` (group `google_play`).
18
33
 
19
- 1. Open [codemagic.io/apps](https://codemagic.io/apps) and add your repository.
20
- 2. **Code signing (iOS):** set up App Store distribution certificate and profile.
21
- 3. **Integrations App Store Connect:** link your Apple account.
22
- 4. **Environment variables:** add to your variable group (e.g. `appstore_credentials`):
23
- - `BACKEND_URL`, `SENTRY_DSN`, `RC_IOS_API_KEY`, `RC_ANDROID_API_KEY`, `MIXPANEL_TOKEN`
24
- 5. In `codemagic.yaml`, set `APP_ID` (numeric App Store Connect app ID from the app URL).
34
+ > The **app keys** (RevenueCat, backend, etc.) do **not** need to be filled in
35
+ > the dashboard: `kasy codemagic release` sends them automatically from your
36
+ > `.env`. If you'd rather trigger from the dashboard/push, add them to the
37
+ > variable groups instead.
25
38
 
26
- ## 3. Configure from the terminal
39
+ ## 3. Set up in the terminal (once)
27
40
 
28
41
  ```bash
29
42
  kasy codemagic configure
30
43
  ```
31
44
 
32
- Enter **API token** (Settings → Codemagic API), **App ID**, and **Workflow ID** (default `ios-workflow`).
45
+ The wizard opens the **API token** page (Settings → Codemagic API), validates the
46
+ token and **lists your apps** to pick from — no IDs to type. It saves everything
47
+ to `.kasy/codemagic.env` (gitignored).
33
48
 
34
49
  ## 4. Trigger a build
35
50
 
36
51
  ```bash
37
- kasy codemagic release
52
+ kasy codemagic release # iOS + Android
53
+ kasy codemagic release --ios # iOS only
54
+ kasy codemagic release --android # Android only
38
55
  ```
39
56
 
40
- The cloud build runs and may upload to TestFlight per `codemagic.yaml`.
57
+ The command reads your `.env` and carries the production keys (including the
58
+ RevenueCat production key, `appl_`/`goog_`) with the trigger. A step in
59
+ `codemagic.yaml` recreates the `.env` in the cloud before building, so the build
60
+ ships with the right keys. Per `codemagic.yaml`, iOS goes to TestFlight and
61
+ Android to the configured track (`internal` by default).
41
62
 
42
63
  ## Build status
43
64
 
@@ -45,6 +66,12 @@ The cloud build runs and may upload to TestFlight per `codemagic.yaml`.
45
66
  kasy codemagic status <buildId>
46
67
  ```
47
68
 
69
+ ## Can I use the Mac and Codemagic at the same time?
70
+
71
+ Yes. They are two paths to the same store; they don't conflict. The build number
72
+ is computed by the cloud (latest in the store + 1), so it rarely collides. For
73
+ day-to-day, pick one main path.
74
+
48
75
  ## Local Mac
49
76
 
50
- If you have a Mac: [ios-release.md](./ios-release.md) and `kasy ios release`.
77
+ If you have a Mac: see [ios-release.md](./ios-release.md) and `kasy ios release`.
@@ -1,10 +1,14 @@
1
- # Publicar iOS con Codemagic (sin Mac)
1
+ # Publicar en la nube con Codemagic (sin Mac)
2
+
3
+ Publica **iOS** y **Android** por la nube de Codemagic. Cada plataforma tiene su
4
+ propio workflow, así que puedes enviarlas por separado o las dos juntas.
2
5
 
3
6
  ## Requisitos
4
7
 
5
8
  - Cuenta [Codemagic](https://codemagic.io)
6
9
  - Repositorio Git conectado a Codemagic
7
- - Cuenta Apple Developer + app en App Store Connect
10
+ - iOS: cuenta Apple Developer + app en App Store Connect
11
+ - Android: app en Google Play Console + un keystore de firma
8
12
 
9
13
  ## 1. Agregar CI al proyecto (si falta)
10
14
 
@@ -12,32 +16,48 @@
12
16
  kasy add ci
13
17
  ```
14
18
 
15
- Crea `codemagic.yaml` en la raíz del proyecto.
19
+ Crea `codemagic.yaml` en la raíz del proyecto (workflows `ios-workflow` y
20
+ `android-workflow`).
21
+
22
+ ## 2. Configurar en el panel Codemagic (una vez)
23
+
24
+ Estos elementos son secretos y solo se hacen en el panel — una vez:
16
25
 
17
- ## 2. Configurar en el panel Codemagic
26
+ 1. Abre [codemagic.io/apps](https://codemagic.io/apps) y **conecta el repositorio**.
27
+ 2. **iOS** — *Integrations → App Store Connect*: conecta la clave de Apple. Su
28
+ nombre va en `integrations: app_store_connect:` en `codemagic.yaml`.
29
+ 3. **Android** — *Code signing identities → Android keystores*: sube el keystore
30
+ con el **Reference name** `keystore_reference` (igual que en `codemagic.yaml`).
31
+ 4. **Android** — sube el JSON de la **service account de Google Play** como
32
+ variable secreta `GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS` (grupo `google_play`).
18
33
 
19
- 1. Abre [codemagic.io/apps](https://codemagic.io/apps) y agrega el repositorio.
20
- 2. **Code signing (iOS):** certificado y perfil de distribución App Store.
21
- 3. **Integrations App Store Connect:** vincula la cuenta Apple.
22
- 4. **Environment variables:** en el grupo del app (ej. `appstore_credentials`):
23
- - `BACKEND_URL`, `SENTRY_DSN`, `RC_IOS_API_KEY`, `RC_ANDROID_API_KEY`, `MIXPANEL_TOKEN`
24
- 5. En `codemagic.yaml`, completa `APP_ID` (ID numérico del app en App Store Connect).
34
+ > Las **claves del app** (RevenueCat, backend, etc.) **no** hace falta cargarlas
35
+ > en el panel: `kasy codemagic release` las envía automáticamente desde tu `.env`.
36
+ > Si prefieres disparar desde el panel/push, agrégalas a los grupos de variables.
25
37
 
26
- ## 3. Configurar en la terminal
38
+ ## 3. Configurar en la terminal (una vez)
27
39
 
28
40
  ```bash
29
41
  kasy codemagic configure
30
42
  ```
31
43
 
32
- Indica **API token** (Settings → Codemagic API), **App ID** y **Workflow ID** (`ios-workflow` por defecto).
44
+ El asistente abre la página del **API token** (Settings → Codemagic API), valida
45
+ el token y **lista tus apps** para elegir — sin escribir IDs. Guarda todo en
46
+ `.kasy/codemagic.env` (no versionado).
33
47
 
34
48
  ## 4. Disparar build
35
49
 
36
50
  ```bash
37
- kasy codemagic release
51
+ kasy codemagic release # iOS + Android
52
+ kasy codemagic release --ios # solo iOS
53
+ kasy codemagic release --android # solo Android
38
54
  ```
39
55
 
40
- El build en la nube puede subir a TestFlight según `codemagic.yaml`.
56
+ El comando lee tu `.env` y lleva las claves de producción (incluida la clave de
57
+ producción de RevenueCat, `appl_`/`goog_`) junto al disparo. Un paso del
58
+ `codemagic.yaml` recrea el `.env` en la nube antes de compilar, así el build sale
59
+ con las claves correctas. Según `codemagic.yaml`, iOS va a TestFlight y Android al
60
+ track configurado (`internal` por defecto).
41
61
 
42
62
  ## Estado del build
43
63
 
@@ -45,6 +65,12 @@ El build en la nube puede subir a TestFlight según `codemagic.yaml`.
45
65
  kasy codemagic status <buildId>
46
66
  ```
47
67
 
68
+ ## ¿Puedo usar el Mac y Codemagic a la vez?
69
+
70
+ Sí. Son dos caminos hacia la misma tienda; no entran en conflicto. El número de
71
+ build lo calcula la nube (último en la tienda + 1), por lo que rara vez choca.
72
+ Para el día a día, elige un camino principal.
73
+
48
74
  ## Mac local
49
75
 
50
76
  Si tienes Mac: [ios-release.md](./ios-release.md) y `kasy ios release`.