Skip to content

Build and Deploy

Build and Deploy #782

name: Build and Deploy
on:
# push:
workflow_dispatch:
schedule:
- cron: '17 8 * * *'
jobs:
js:
name: JavaScript Checks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: '.node-version'
cache: npm
- run: npm ci
- run: npm run validate-data
- run: npm run bundle-data
- run: npm run pretty --no-write --list-different
- run: npx tsc
- run: npm run lint
- name: Run tests
run: npm run test -- --coverage
- name: Upload coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)
android:
name: Build for Android
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: '.node-version'
cache: npm
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Restore Gradle cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- run: npm ci
- name: Raise the fs.inotify ulimits to 524288 watches/queued events/user instances
run: |
echo 524288 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
echo 524288 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
echo 524288 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
sudo sysctl -p
- run: echo 'org.gradle.workers.max=2' >> ./android/gradle.properties
- run: cd android && ./gradlew androidDependencies --console=plain
- run: npm run bundle-data
- run: bundle exec fastlane android ci-run
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
GIT_COMMIT_DESC: $(git log --format=oneline -n 1 $GITHUB_SHA)
FASTLANE_SKIP_UPDATE_CHECK: '1'
FASTLANE_DISABLE_ANIMATION: '1'
SENTRY_ORG: frog-pond-labs
SENTRY_PROJECT: all-about-olaf
SENTRY_AUTH_TOKEN: ${{ secrets.HOSTED_SENTRY_AUTH_TOKEN }}
GITHUB_KEYS_REPOSITORY_TOKEN: ${{ secrets.GITHUB_KEYS_REPOSITORY_TOKEN }}
ios:
name: Build for iOS
runs-on: macos-14
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: '.node-version'
cache: npm
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- run: sudo xcode-select -s /Applications/Xcode_15.2.app
- run: git fetch --prune --unshallow
- run: npm ci
env:
SKIP_POSTINSTALL: '1'
- run: bundle exec pod install --deployment
working-directory: ./ios
- run: brew tap wix/brew
- run: brew install applesimutils
- run: bundle exec fastlane ios ci-run
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
GIT_COMMIT_DESC: $(git log --format=oneline -n 1 $GITHUB_SHA)
FASTLANE_SKIP_UPDATE_CHECK: '1'
FASTLANE_DISABLE_ANIMATION: '1'
SENTRY_ORG: frog-pond-labs
SENTRY_PROJECT: all-about-olaf
SENTRY_AUTH_TOKEN: ${{ secrets.HOSTED_SENTRY_AUTH_TOKEN }}
GITHUB_KEYS_REPOSITORY_TOKEN: ${{ secrets.GITHUB_KEYS_REPOSITORY_TOKEN }}