Files
self/.github/actions/mobile-setup/action.yml
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

103 lines
3.0 KiB
YAML

name: Setup Mobile Environment
description: "Sets up the environment for mobile app builds"
inputs:
app_path:
description: "Path to the app directory"
required: true
node_version:
description: "Node version"
required: true
ruby_version:
description: "Ruby version"
required: true
workspace:
description: "Workspace directory path"
required: true
runs:
using: "composite"
steps:
- name: Install locales and dialog for local development
if: ${{ env.ACT }}
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y locales dialog unzip
# for fastlane
- name: Install locales and dialog
if: runner.os != 'macOS'
shell: bash
run: |
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
- name: Setup Ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby_version }}
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
- name: Configure bundler
shell: bash
run: |
cd ${{ inputs.app_path }}
bundle config set --local path 'vendor/bundle'
bundle config set --local deployment 'true'
echo "✅ Bundler configured for strict mode (deployment=true)"
- name: Install app dependencies
shell: bash
run: |
cd ${{ inputs.app_path }}
# Configure Yarn
corepack enable
yarn set version 4.6.0
echo "📦 Installing JavaScript dependencies with strict lock file..."
if ! yarn install --immutable --inline-builds; then
echo ""
echo "❌ ERROR: yarn.lock is out of date!"
echo ""
echo "This happens when package.json was modified but yarn.lock wasn't updated."
echo ""
echo "To fix this:"
echo " 1. Run 'yarn install' locally in the app directory"
echo " 2. Commit the updated yarn.lock file"
echo " 3. Push your changes"
echo ""
echo "This ensures everyone has the exact same dependency versions."
exit 1
fi
# Run mobile-specific installation
yarn install-app:mobile-deploy
- name: Install Ruby dependencies
shell: bash
run: |
cd ${{ inputs.app_path }}
# Install Ruby gems with bundler (respecting cache)
echo "📦 Installing Ruby gems with strict lock file..."
if ! bundle install --jobs 4 --retry 3; then
echo ""
echo "❌ ERROR: Gemfile.lock is out of date!"
echo ""
echo "This happens when Gemfile was modified but Gemfile.lock wasn't updated."
echo ""
echo "To fix this:"
echo " 1. Run 'bundle install' locally in the app directory"
echo " 2. Commit the updated Gemfile.lock file"
echo " 3. Push your changes"
echo ""
echo "This ensures everyone has the exact same gem versions."
exit 1
fi