chore: update test app to use tarball plugin dependency (#187) #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish test apps | |
on: | |
pull_request: | |
push: | |
branches: [ beta, feature/* ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-android-app: | |
name: Build and publish Android app | |
runs-on: ubuntu-latest | |
env: | |
GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64: ${{ secrets.GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64 }} | |
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Install tools from Gemfile (ruby language) used for building our apps with | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Install sd CLI to use later in the workflow | |
uses: kenji-miyake/setup-sd@v2 | |
- name: Bundle install | |
working-directory: test-app | |
run: bundle install | |
- name: Update test app version # This has to happen before we generate the native app | |
uses: maierj/[email protected] | |
with: | |
lane: update_expo_test_app_version | |
subdirectory: test-app | |
- name: Install plugin dependencies | |
working-directory: plugin | |
run: npm ci | |
- name: Setup test project | |
run: npm run setup-tests | |
- name: Setup CIO workspace credentials in test apps config | |
run: | | |
sd '@CDP_API_KEY@' "${{ secrets.CUSTOMERIO_EXPO_WORKSPACE_CDP_API_KEY }}" test-app/app.json | |
sd '@SITE_ID@' "${{ secrets.CUSTOMERIO_EXPO_WORKSPACE_SITE_ID }}" test-app/app.json | |
- name: Build Android app with fastlane | |
uses: maierj/[email protected] | |
with: | |
lane: android build | |
subdirectory: test-app | |
env: | |
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }} | |
build-ios-app: | |
name: Build and publish iOS app | |
runs-on: macos-14 | |
env: | |
GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64: ${{ secrets.GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64 }} | |
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install XCode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: "15.3" | |
- name: Install tools from Gemfile (ruby language) used for building our apps with | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Install SD CLI | |
run: brew install sd | |
- name: Bundle install | |
working-directory: test-app | |
run: bundle install | |
- name: Update test app version # This has to happen before we generate the native app | |
uses: maierj/[email protected] | |
with: | |
lane: update_expo_test_app_version | |
subdirectory: test-app | |
- name: Install plugin dependencies | |
working-directory: plugin | |
run: npm ci | |
- name: Setup test project | |
run: npm run setup-tests | |
- name: Setup CIO workspace credentials in test apps config | |
run: | | |
sd '@CDP_API_KEY@' "${{ secrets.CUSTOMERIO_EXPO_WORKSPACE_CDP_API_KEY }}" test-app/app.json | |
sd '@SITE_ID@' "${{ secrets.CUSTOMERIO_EXPO_WORKSPACE_SITE_ID }}" test-app/app.json | |
- name: Copy GoogleService-Info.plist to ios project | |
run: | | |
cp test-app/files/GoogleService-Info.plist test-app/ios/GoogleService-Info.plist | |
gem install xcodeproj | |
ruby scripts/add-google-service-ios.rb | |
- name: Build iOS app with fastlane | |
uses: maierj/[email protected] | |
with: | |
lane: ios build_ios | |
subdirectory: test-app | |
env: | |
GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64: ${{ secrets.GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64 }} | |
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }} |