Skip to content

Build and Deploy

Build and Deploy #986

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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version-file: '.node-version'
cache: npm
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: Restore Gradle cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version-file: '.node-version'
cache: npm
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
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 }}