Commit Graph

22 Commits

Author SHA1 Message Date
Justin Hernandez
a005bde034 [SELF-747] feat: clone android passport reader during setup (#1080)
* chore: remove android private modules doc

* private repo pull

* skip private modules

* remove unused circuits building

* save wip

* format

* restore tsconfig

* fix package install

* fix internal repo cloning

* unify logic and fix cloning

* git clone internal repos efficiently

* formatting

* run app yarn reinstall from root

* coderabbit feedback

* coderabbit suggestions

* remove skip private modules logic

* fix: ensure PAT is passed through yarn-install action and handle missing PAT gracefully

- Update yarn-install action to pass SELFXYZ_INTERNAL_REPO_PAT to yarn install
- Make setup-private-modules.cjs skip gracefully when PAT is unavailable in CI
- Fixes issue where setup script was throwing error instead of skipping for forks

* prettier

* fix clone ci

* clone ci fixes

* fix import export sorts

* fix instructions

* fix: remove SelfAppBuilder re-export to fix duplicate export error

- Remove SelfAppBuilder import/export from @selfxyz/qrcode
- Update README to import SelfAppBuilder directly from @selfxyz/common
- Fixes CI build failure with duplicate export error

* fix: unify eslint-plugin-sort-exports version across workspaces

- Update mobile-sdk-alpha from 0.8.0 to 0.9.1 to match other workspaces
- Removes yarn.lock version conflict causing CI/local behavior mismatch
- Fixes quality-checks workflow linting failure

* fix: bust qrcode SDK build cache to resolve stale SelfAppBuilder issue

- Increment GH_SDK_CACHE_VERSION from v1 to v2
- Forces CI to rebuild artifacts from scratch instead of using cached version
- Resolves quality-checks linter error showing removed SelfAppBuilder export

* skip job

* test yarn cache

* bump cache version to try and fix the issue

* revert cache version

* refactor: use direct re-exports for cleaner qrcode package structure

- Replace import-then-export pattern with direct re-exports
- Keep SelfAppBuilder export with proper alphabetical sorting (before SelfQRcode)
- Maintain API compatibility as documented in README
- Eliminates linter sorting issues while keeping clean code structure

* fix: separate type and value imports in README examples

- Import SelfApp as type since it's an interface
- Import SelfAppBuilder as value since it's a class
- Follows TypeScript best practices and improves tree shaking
2025-09-18 14:55:25 -07:00
Justin Hernandez
75dee90e41 chore(ci): improve mobile e2e caching (#1010)
* chore(ci): improve mobile e2e caching

* chore(ci): restore deriveddata cache

* chore(ci): remove ios deriveddata cache

* chore(ci): cache ios derived data

* chore(ci): optimize mobile deploy caching

* chore(ci): enable ccache for ios e2e builds

* fix(ci): add ccache path for ios e2e
2025-09-09 01:37:10 -07:00
Justin Hernandez
ff678b359a chore: fix yarn format (#1009)
* fix yarn format

* yarn format

* fix lint

* undo temporary disabling

* pipeline fixes

* revert nvmrc change
2025-09-07 19:48:46 -07:00
Justin Hernandez
b6d526e5f8 chore: update dev with staging 09/06/25 (#1007)
* update CI

* bump iOS version

* update readme

* update mobile-deploy ci

* bump version iOS

* update workflow to use workload identity federation (#933)

* update workflow to use workload identity federation

* add token permissions

* correct provider name

* chore: incrementing android build version for version 2.6.4 [github action]

---------

Co-authored-by: Self GitHub Actions <action@github.com>

* update ci

* update ci

* update ci

* update ci

* update ci

* fix ci

* fix ci

* fix ci

* remove fastlane use for android

* bump iOS build version

* update CI python script

* iterate on CI

* iterate on CI

* iterate on CI

* Dev (#941)

* SDK Go version (#920)

* feat: helper functions and constant for go-sdk

* feat: formatRevealedDataPacked in go

* chore: refactor

* feat: define struct for selfBackendVerifier

* feat: verify function for selfBackendVerifier

* feat(wip): custom hasher

* feat: SelfVerifierBacked in go

* test(wip): scope and userContextHash is failing

* test: zk proof verified

* fix: MockConfigStore getactionId function

* chore: refactor

* chore: remove abi duplicate files

* chore: move configStore to utils

* chore: modified VcAndDiscloseProof struct

* chore: more review changes

* feat: impl DefaultConfig and InMemoryConfigStore

* chore: refactor and export functions

* fix: module import and README

* chore: remove example folder

* chore: remove pointers from VerificationConfig

* chore: coderabbit review fixes

* chore: more coderabbit review fix

* chore: add license

* fix: convert attestationIdd to int

* chore: remove duplicate code

---------

Co-authored-by: ayman <aymanshaik1015@gmail.com>

* Moving proving Utils to common (#935)

* remove react dom

* moves proving utils to the common

* need to use rn components

* fix imports

* add proving-utils and dedeuplicate entry configs for esm and cjs.

* must wrap in text component

* fix metro bundling

* fix mock import

* fix builds and tests

* please save me

* solution?

* fix test

* Move proving inputs to the common package (#937)

* create ofactTree type to share

* move proving inputs from app to register inputs in common

* missed reexport

* ok

* add some validations as suggested by our ai overlords

* Fix mock passport flow (#942)

* fix dev screens

* add hint

* rename

* fix path

* fix mobile-ci path

* fix: extractMRZ (#938)

* fix: extractMRZ

* yarn nice && yarn types

* fix test: remove unused

* fix mobile ci

* add script

---------

Co-authored-by: Justin Hernandez <transphorm@gmail.com>

* Move Proving attest and cose (#950)

* moved attest and cose utils to common

with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common

what does cryptoLoader do?

* moved away

* get buff

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <transphorm@gmail.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

---------

Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: ayman <aymanshaik1015@gmail.com>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Justin Hernandez <transphorm@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* bump version

* bump yarn.lock

* update ci (#966)

* chore: Manually bump and release v2.6.4 (#961)

* update lock files

* bump and build android

* update build artifacts

* show generate mock document button

* update lock

* fix formatting and update failing e2e test

* revert podfile

* fixes

* fix cold start of the app with deeplink

* update ci

* update ci

* Sync MARKETING_VERSION to iOS project files after version bump

* chore: incrementing android build version for version 2.6.4 [github action] (#976)

Co-authored-by: remicolin <98749896+remicolin@users.noreply.github.com>

* chore: add build dependencies step for iOS and Android in mobile deploy workflow

* chore: enhance mobile deploy workflow by adding CMake installation step

* bump android build version

* chore: incrementing android build version for version 2.6.4 [github action] (#985)

Co-authored-by: remicolin <98749896+remicolin@users.noreply.github.com>

* chore: configure Metro bundler for production compatibility in mobile deploy workflow

* chore: incrementing android build version for version 2.6.4 [github action] (#987)

Co-authored-by: remicolin <98749896+remicolin@users.noreply.github.com>

* Revert "chore: configure Metro bundler for production compatibility in mobile deploy workflow"

This reverts commit 60fc1f2580.

* reduce max old space size in mobile-deploy ci

* fix android french id card (#957)

* fix android french id card

* fix common ci cache

* feat: log apdu (#988)

---------

Co-authored-by: Justin Hernandez <transphorm@gmail.com>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>

* unblock ci

* fix merge

* merge fixes

* fix tests

* make ci happy

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
Co-authored-by: pputman-clabs <99900942+pputman-clabs@users.noreply.github.com>
Co-authored-by: Self GitHub Actions <action@github.com>
Co-authored-by: turnoffthiscomputer <98749896+remicolin@users.noreply.github.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: ayman <aymanshaik1015@gmail.com>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-07 11:19:59 -07:00
Justin Hernandez
f98effe5e5 chore: update to macos latest large runner (#981)
* bump up to macos-latest-large

* fix ci
2025-08-28 21:45:38 -07:00
Justin Hernandez
590f188f3c [SELF-676] feat: upgrade React Native from 0.75.4 to 0.76.9 (#943)
* chore: upgrade build tooling to Node 22 and AGP 8.6

* chore: upgrade react-native to 0.76.9

* update lock files and formatting

* fix path

* fix: handle hermes-engine cache mismatch in CI after React Native upgrade

- Add fallback logic to run 'pod update hermes-engine' when pod install fails
- This resolves CocoaPods cache issues that occur after React Native version upgrades
- Fixes CI pipeline failures on codex/update-core-tooling-for-react-native-upgrade branch

* fix: improve hermes-engine cache handling in CI

- Preemptively clear CocoaPods cache before pod install
- This prevents dependency analysis failures that occur when cached podspecs conflict
- Addresses the root cause: cache conflicts during 'Analyzing dependencies' phase
- Keeps fallback logic for additional safety

* fix: handle hermes-engine cache in mobile-bundle-analysis workflow

- Add pod-install-with-cache-fix.sh script to handle hermes-engine cache conflicts
- Update install-app:setup script to use the new cache fix approach
- This fixes the mobile-bundle-analysis.yml workflow failures after React Native upgrade
- Proactively clears CocoaPods cache and has fallback for hermes-engine updates

* formatting

* fix: robust hermes-engine cache handling in CI workflows

- Apply comprehensive cache clearing to mobile-ci.yml and mobile-e2e.yml
- Pre-emptively run 'pod update hermes-engine' before pod install
- Clear multiple cache locations to handle CI environment differences
- This prevents 'hermes-engine differs from Pods/Local Podspecs' errors
- Fixes all workflows affected by React Native 0.76.9 upgrade cache issues

* fixes

* clean up

* update lock files

* fix tests

* sort

* fixes

* fix ci

* fix deployment target

* android fixes

* upgrade fix

* fixes

* fix: streamline mobile CI build and caching (#946)

* fix: streamline mobile CI build and caching

* Enable mobile E2E tests on codex/fix-mobile-ci-workflow-errors branch

* test

* simplify and fix path

* workflow fixes

* fix loading on 0.76.9

* clean up unnecessary comments

* fix readme

* finalize upgrade to 0.76.9

* fix android build and upgrade

* fix bundler caching

* download cli to fix "yarn start" issues

* fix cli build erorr

* fix script path

* better path

* abstract build step to prevent race condition

* fixes

* better cache

* fix corepack build error

* update lock

* update lock

* add yarn cache to workflows

* fix test building

* ci caching improvements

* fix common type check

* fix common ci

* better mobile sdk alpha building logic

* chore: speed up mobile e2e workflow (#962)

* chore: speed up mobile e2e workflow

* chore: disable android e2e job

* chore: speed up ios build

* fix: bundle js for ios debug build

* fix e2e
2025-08-26 20:27:51 -07:00
Justin Hernandez
422ba91d87 chore: fix ios e2e workflow; upgrade to Xcode 16.4 (#915)
* chore: streamline ios e2e workflow

* fix version

* fix

* fixes

* fix path

* fix path issue

* revert back to dev. test locally first

* fix missing dep

* update lock

* fix version

* fix ndk

* fix scheme

* fixes

* fix e2e

* fixes

* fix pipeline

* fix and unify xcode version

* update workflow

* fix pipeline

* implement pipeline fix

* fix ios version

* remove || true
2025-08-19 08:10:06 -07:00
Justin Hernandez
691e8b1517 chore: unify lightweight deps and workflow node version (#906)
* chore: unify lightweight deps and workflow node version

* gigamind flow updates

* standardize workflows

* fix workflow

* improvements

* Gigamind tweaks (#911)

* save gigamind updates

* keep manual review on for now

* pr feedback

* fix pipeline

* make runner more dynamic

* fix regex

* fixes

* update simulator

* fixes

* fixes

* fix regex

* try again

* test

* revert back to dev settings

* mobile fixes

* fixes

* fix runtime

* just use latest

* pr feedback

* remove template

* Update .github/workflows/mobile-e2e.yml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-17 21:00:36 -07:00
Justin Hernandez
29c620badd Add composite cache actions (#874)
* Add composite cache actions

* cr feedback

* add cache versions
2025-08-10 19:16:31 -07:00
Justin Hernandez
cd2ec0d9c5 Cache dependencies in mobile workflows (#873)
* Cache mobile build deps

* updates
2025-08-10 18:28:44 -07:00
Justin Hernandez
343515c35f chore: add Node version file (#853) 2025-08-07 17:48:25 -07:00
Justin Hernandez
fdb932eeba Feat: Lightweight e2e tests for iOS and Android (#840)
* Add Maestro e2e testing

* Run Maestro flows in parallel

* Fix mobile e2e workflow

* Fix e2e script flow path

* prettier

* fix

* prettier

* standardize yml files and new formatting commands

* fix ndk

* fix exclusions

* use double quotes for yml files

* feedback

* fixes

* fixes

* fix

* fix ios job

* unneeded

* fix workflows

* fix launch workflow

* fix

* fix pipeline

* workflow fixes

* install app to emulators

* better logging

* save current version of test script

* android works. ios wip. update locks

* fix pipelines

* cr feedback

* fix android e2e test

* Split mobile e2e workflow by platform (#842)

* Replace react-native-quick-crypto with @noble/hashes (#841)

* Add tests for ethers polyfills

* Add crypto utils

* Inline crypto polyfills into ethers util

* sort and update gemfile lock

* update lock

* chore: incrementing ios build number for version 2.6.3 [github action]

* android works. ios wip. update locks

* Specify Maestro platform

* Fix Android build step in e2e workflow

* fix android

* update ios

* add concurrency

* update Podfile.lock

* fix android

* prettier

* fix

* fix android pipeline

* try job again

* fix ios

* fix android

* fix ios

* fix command

* use android runner now that path is fixed

* fix android e2e test

* fix adb

* add caching

* fix build

* speed up build

* fix

* test emulator options

* updates

* fix pipeline

* fix

* fix script and move on

* add comment

---------

Co-authored-by: Self GitHub Actions <action@github.com>

* feedback

* fixes

* ignore for now

* ignore

* fix tests

* fix ios simulator booting

* fix ios test

* shutdown after run

* fix ios test

* better timing

* increase ios timeout

* fix both flows

* fix pipeline

* combine command

* fix ios

* break up build steps for better caching

* remove cache

* fix ios and android test pipelines

* update logic

---------

Co-authored-by: Self GitHub Actions <action@github.com>
2025-08-06 12:41:09 -07:00
Justin Hernandez
17e1633ee7 Update NDK and packaging (#820)
* Update NDK version and packaging options

* Update NDK references

* update lock files

* readme updates
2025-08-01 16:18:12 -07:00
jayssj11
dcc341673f fix android build failure (#827)
- Modified package.json to create separate install commands for iOS and Android
  - Updated mobile-setup/action.yml to use platform-specific install commands
  - Android builds will no longer try to run pod install and increment ios build number
2025-07-31 18:35:55 +08:00
jayssj11
76db38a9bb Test/pipeline trigger demo (#826)
* test: trigger CI/CD pipeline with harmless comment update

Testing the auto-deploy workflow after recent fixes

* fix: remove duplicate checkout in mobile-setup action

The mobile-setup action was doing its own checkout which could cause
inconsistencies between iOS and Android jobs. The main workflow already
handles checkout, so this duplicate checkout was causing Android builds
to fail with Gemfile.lock errors while iOS passed.

* fix: enable checkout for Android builds

The checkout step was conditionally skipped for Android builds,
causing 'yarn.lock and Gemfile.lock missing' errors. Both iOS
and Android need the repository checked out to access lock files.
2025-07-31 17:58:23 +08:00
jayssj11
9a5cb5321c fix: correct workflow syntax for reusable workflows (#798)
* fix: correct workflow syntax for reusable workflows

- Split deploy job into deploy-ios and deploy-android
- Fixed platforms output to use JSON array format
- Resolves startup_failure error

* fix: update mobile-deploy.yml to support workflow_call events

- Remove github.event_name == 'workflow_dispatch' conditions
- Use inputs context directly which works for both workflow_dispatch and workflow_call
- Update deployment status messages to show input parameters
- This allows mobile-deploy-auto.yml to successfully trigger deployments

* fix: correct job dependencies and input references in mobile-deploy.yml

- Fix create-release-tags job to depend on 'update-version' not 'update-version-files'
- Change github.event.inputs.test_mode to inputs.test_mode for workflow_call compatibility
- Remove redundant workflow_dispatch check in production condition
- Fix test_mode comparison to use boolean instead of string
- This resolves the workflow validation errors
2025-07-29 13:33:27 +08:00
jayssj11
c269e66f10 Feat/push to dev main (#767)
* feat: add version management system with build number tracking

- Add version.json to track iOS/Android build numbers separately
- Create version.cjs script for build number management
- Add Fastlane version_manager.rb helper
- Keep npm version for semver, version.json for build tracking

* feat: integrate version.json with Fastlane deployment process

## What Changed
- Updated iOS and Android Fastlane lanes to use version.json for build number management
- Added automatic build number increment on deployment
- Added deployment timestamp tracking

## How It Works

### iOS Deployment
1. Reads current build number from version.json
2. Increments iOS build number (e.g., 148 → 149)
3. Updates Xcode project with new build number via increment_build_number
4. Proceeds with TestFlight deployment
5. Updates lastDeployed timestamp on successful upload

### Android Deployment
1. Reads current build number from version.json
2. Increments Android build number (e.g., 82 → 83)
3. Updates build.gradle with new version code via increment_version_code
4. Proceeds with Play Store deployment
5. Updates lastDeployed timestamp on successful upload

## Why This Change
- Eliminates manual version/build number entry
- Prevents version conflicts between deployments
- Provides single source of truth for build numbers
- Enables automatic deployments without human intervention
- Tracks deployment history with timestamps

## Dependencies
- Requires version.json file (already created in previous commit)
- Uses existing Fastlane plugins:
  - increment_build_number (iOS - built-in)
  - increment_version_code (Android - from plugin)
- Version numbers still managed by npm version command

* feat: enhance deploy confirmation with version.json info

* fix: use ENV variable directly in increment_build_number to avoid secret masking

* fix: correct xcodeproj path for GitHub Actions workflow

* feat: add test mode to workflow for safe testing

- Skip store uploads when test_mode is true
- Test version bumps and builds without deployment
- Prevent accidental pushes to TestFlight/Play Store

* fix: use gradle_file_path instead of gradle_file for increment_version_code

* fix: use gsub to remove ../ prefix for CI compatibility

* chore: remove accidentally committed files

- Remove .cursor/mcp.json
- Remove .cursorignore
- Remove deployment-automation-summary.md
- Remove deployment-meeting-questions.md
- Remove pipeline.md

* feat: auto-commit version.json after successful deployment

- Commits version.json changes back to repository
- Only runs when test_mode is false
- Uses [skip ci] to prevent infinite loops
- Checks for actual changes before committing

* feat : update package.json in build step using npm version

* feat: add comprehensive caching to mobile deployment workflow

- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK
- Implement cache versioning strategy for easy cache invalidation
- Fix cache order: caches now restored after checkout but before dependency installation
- Update mobile-setup action to skip installs when dependencies are cached
- Add cache size monitoring to track usage against GitHub's 10GB limit
- Fix Slack notification bug: skip notifications in test_mode
- Add detailed logging for package.json version updates (show from/to versions)

Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)

* fix: move bundler config after Ruby setup in mobile-setup action

* fix: rename cache env vars to avoid Yarn conflicts

Yarn was interpreting YARN_CACHE_VERSION as its own config setting.
Prefixed all cache version env vars with GH_ to avoid conflicts.

* fix: remove bundler deployment mode to allow Gemfile updates

The deployment mode was causing bundler to fail when Gemfile
changed (nokogiri was removed). CI should be able to update
the lockfile as needed.

* feat: implement strict lock file enforcement (Option 1)

- Re-enable bundler deployment mode for strict Gemfile.lock checking
- Use yarn install --immutable for strict yarn.lock checking
- Add clear error messages when lock files are out of date
- Add pre-checks to verify lock files exist
- This ensures reproducible builds and makes caching maximally effective

When developers change dependencies, they must now:
1. Run yarn install or bundle install locally
2. Commit the updated lock files
3. CI will fail with helpful instructions if they forget

* fix: update Gemfile.lock for CI environment

Remove nokogiri from Gemfile.lock since it's excluded in CI
environments (GITHUB_ACTIONS=true). This allows the strict
lock file checks to pass in CI.

* fix: correct yarn.lock path for monorepo workspace

The project uses Yarn workspaces with yarn.lock at the repository
root, not in the app directory. Updated paths to check for yarn.lock
at workspace root and use it for cache keys.

* fix: handle both boolean and string test_mode parameter

The test_mode parameter was only checking for string 'true' but
could be passed as boolean true from command line. Now handles both
cases to ensure test mode works correctly for iOS and Android.

* fix: address code review feedback for mobile deployment workflow

- Replace jq with Node.js for version extraction (jq not available on macOS runners)
- Fix concurrent commit race condition by creating separate update-version job
- Add platform validation to version_manager.rb and version.cjs scripts
- Use POSIX-compatible single = for shell string comparisons
- Ensure single atomic commit when deploying to both platforms

* fix: formatting and linting issues

- Remove trailing spaces from workflow YAML file
- Fix prettier formatting in JavaScript files
- Add -y flag to yarn version command for non-interactive mode
- Address all lint warnings from CI

* feat: implement automated branch-based mobile deployments

- Add mobile-deploy-auto.yml workflow that triggers on PR merges to dev/main
- Update mobile-deploy.yml to support workflow_call for reusability
- Add deployment_track, version_bump, and auto_deploy parameters
- Create new Fastlane lanes (deploy_auto) for iOS and Android
- Implement smart version bumping based on PR labels (major/minor/patch)
- Add graceful error handling for Play Store permission issues
- Enhance Slack notifications with deployment track information

This enables automatic deployments when PRs are merged:
- dev branch → internal testing track
- main branch → production track
- Skip deployment with [skip-deploy] in PR or no-deploy label

* feat: add automated git tagging and release system

- Add automatic git tagging for production deployments (v2.5.5, platform-specific tags)
- Create GitHub releases with changelogs for production deployments
- Add manual release script (yarn release) for version bumping and tagging
- Implement simple changelog generation from git history
- Add comprehensive deployment documentation in .github/MOBILE_DEPLOYMENT.md
- Update app/README.md with deployment commands and workflows

This completes the release automation system requested in the ticket for
manual tagging and versioning with automated changelogs and release notes.

---------

Co-authored-by: Jayaditya Gupta <nightmare@Jayadityas-MacBook-Pro.local>
2025-07-29 12:42:39 +08:00
jayssj11
7d5545bc91 Feat/mobile deployment automation (#759)
* feat: add version management system with build number tracking

- Add version.json to track iOS/Android build numbers separately
- Create version.cjs script for build number management
- Add Fastlane version_manager.rb helper
- Keep npm version for semver, version.json for build tracking

* feat: integrate version.json with Fastlane deployment process

## What Changed
- Updated iOS and Android Fastlane lanes to use version.json for build number management
- Added automatic build number increment on deployment
- Added deployment timestamp tracking

## How It Works

### iOS Deployment
1. Reads current build number from version.json
2. Increments iOS build number (e.g., 148 → 149)
3. Updates Xcode project with new build number via increment_build_number
4. Proceeds with TestFlight deployment
5. Updates lastDeployed timestamp on successful upload

### Android Deployment
1. Reads current build number from version.json
2. Increments Android build number (e.g., 82 → 83)
3. Updates build.gradle with new version code via increment_version_code
4. Proceeds with Play Store deployment
5. Updates lastDeployed timestamp on successful upload

## Why This Change
- Eliminates manual version/build number entry
- Prevents version conflicts between deployments
- Provides single source of truth for build numbers
- Enables automatic deployments without human intervention
- Tracks deployment history with timestamps

## Dependencies
- Requires version.json file (already created in previous commit)
- Uses existing Fastlane plugins:
  - increment_build_number (iOS - built-in)
  - increment_version_code (Android - from plugin)
- Version numbers still managed by npm version command

* feat: enhance deploy confirmation with version.json info

* fix: use ENV variable directly in increment_build_number to avoid secret masking

* fix: correct xcodeproj path for GitHub Actions workflow

* feat: add test mode to workflow for safe testing

- Skip store uploads when test_mode is true
- Test version bumps and builds without deployment
- Prevent accidental pushes to TestFlight/Play Store

* fix: use gradle_file_path instead of gradle_file for increment_version_code

* fix: use gsub to remove ../ prefix for CI compatibility

* chore: remove accidentally committed files

- Remove .cursor/mcp.json
- Remove .cursorignore
- Remove deployment-automation-summary.md
- Remove deployment-meeting-questions.md
- Remove pipeline.md

* feat: auto-commit version.json after successful deployment

- Commits version.json changes back to repository
- Only runs when test_mode is false
- Uses [skip ci] to prevent infinite loops
- Checks for actual changes before committing

* feat : update package.json in build step using npm version

* feat: add comprehensive caching to mobile deployment workflow

- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK
- Implement cache versioning strategy for easy cache invalidation
- Fix cache order: caches now restored after checkout but before dependency installation
- Update mobile-setup action to skip installs when dependencies are cached
- Add cache size monitoring to track usage against GitHub's 10GB limit
- Fix Slack notification bug: skip notifications in test_mode
- Add detailed logging for package.json version updates (show from/to versions)

Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)

* fix: move bundler config after Ruby setup in mobile-setup action

* fix: rename cache env vars to avoid Yarn conflicts

Yarn was interpreting YARN_CACHE_VERSION as its own config setting.
Prefixed all cache version env vars with GH_ to avoid conflicts.

* fix: remove bundler deployment mode to allow Gemfile updates

The deployment mode was causing bundler to fail when Gemfile
changed (nokogiri was removed). CI should be able to update
the lockfile as needed.

* feat: implement strict lock file enforcement (Option 1)

- Re-enable bundler deployment mode for strict Gemfile.lock checking
- Use yarn install --immutable for strict yarn.lock checking
- Add clear error messages when lock files are out of date
- Add pre-checks to verify lock files exist
- This ensures reproducible builds and makes caching maximally effective

When developers change dependencies, they must now:
1. Run yarn install or bundle install locally
2. Commit the updated lock files
3. CI will fail with helpful instructions if they forget

* fix: update Gemfile.lock for CI environment

Remove nokogiri from Gemfile.lock since it's excluded in CI
environments (GITHUB_ACTIONS=true). This allows the strict
lock file checks to pass in CI.

* fix: correct yarn.lock path for monorepo workspace

The project uses Yarn workspaces with yarn.lock at the repository
root, not in the app directory. Updated paths to check for yarn.lock
at workspace root and use it for cache keys.

* fix: handle both boolean and string test_mode parameter

The test_mode parameter was only checking for string 'true' but
could be passed as boolean true from command line. Now handles both
cases to ensure test mode works correctly for iOS and Android.

* fix: address code review feedback for mobile deployment workflow

- Replace jq with Node.js for version extraction (jq not available on macOS runners)
- Fix concurrent commit race condition by creating separate update-version job
- Add platform validation to version_manager.rb and version.cjs scripts
- Use POSIX-compatible single = for shell string comparisons
- Ensure single atomic commit when deploying to both platforms

* fix: formatting and linting issues

- Remove trailing spaces from workflow YAML file
- Fix prettier formatting in JavaScript files
- Add -y flag to yarn version command for non-interactive mode
- Address all lint warnings from CI

---------

Co-authored-by: Jayaditya Gupta <nightmare@Jayadityas-MacBook-Pro.local>
2025-07-28 13:39:47 +08:00
Justin Hernandez
b841b19d96 Improve manual mobile deploy workflow and docs (#728)
* Add basic Fastlane helper tests

* Upgrade fastlane and enhance helper tests (#738)

* simplify mobile deploy pipelines and make them manual. update readme

* update fastlane dev readme

* update tests and add helper script

* cr feedback, update tests, revert circuits package.json sort change

* tweaks

* fix slack

* cr feedback and fixes

* add better cjs eslint support

* save wip. add confirmation check script. update scripts

* remove auto increment feature

* migrate readme items over to DEV due to fastlane auto regen docs flow

* use regular xcode

* fix hermes compiler path

* coderabbit feedback

* reinstall when on local dev

* fix upload

* simplify

* simplify confirmation feedback with tests

* fix mobile deploys

* cr feedback

* test iOS building

* fix trigger logic

* cr feedback

* updates

* fix env var

* fix order

* re-enable upload to testflight for ios

* updated notes
2025-07-03 22:32:14 -07:00
Justin Hernandez
3c51feafdf DX: Auto format on save (#526)
* save wip

* use elint instead of prettier to sort imports

* set imports to warn

* sync prettier settigns

* update prettier settings

* save working version

* fix export and disable mobile pipeline for now

* limit auto formatting to the app folder
2025-04-21 22:10:56 +02:00
Justin Hernandez
7297659a30 Bump version to 2.5.1 (#522)
* bump version

* update fastlane

* fix bump version

* bump build and add todo

* disable commit for now
2025-04-17 21:09:40 +02:00
Justin Hernandez
a3dc3bcfd1 feat: automated mobile deployments rd2 (#498)
* migrate build logic from previous branch

* fix command

* move .actrc file

* clean up

* use env vars

* setup provisioning profile path within action

* fix flow

* fix fastfile flow and update react native

* disable play store uploading

* hard code xcode version

* fixes

* more provisioning debugging

* fix keychain path

* set keychain to what was created by the github action

* attempt to build again

* test fix

* print xcode build settings

* debug ios build

* fix xcargs path

* use manual code signing

* save wip

* fix building locally

* fix variable

* save wip

* clean up long comand

* clean up

* install bundle and gems

* install pods

* fix pod installation

* sort

* better naming

* fix android issues

* update lock

* clean up artifacts

* format

* save wip slack upload logic

* prettier

* fix indent

* save wip

* save wip

* save wip

* save wip

* save wip

* clean up

* simplify slack calls

* revert slack logic

* save working slack upload example

* make title nicer

* clean up slack upload

* upload paths

* enable github commit

* fix path

* fix commit step

* fix git committing

* update markdown

* fix git commit rule

* better commit message

* chore: incrementing ios build number for version 2.4.9 [skip ci]

* better name

---------

Co-authored-by: Self GitHub Actions <action@github.com>
2025-04-11 19:51:02 +02:00