Skip to content

Upgrade Expo packages #94

Upgrade Expo packages

Upgrade Expo packages #94

name: Upgrade Expo packages
on:
workflow_dispatch:
schedule:
# 18:00 on Thursday, similar to how Renovate is configured:
# https://github.com/karlhorky/renovate-config
- cron: '0 18 * * 4'
jobs:
build:
name: Upgrade Expo packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# To trigger further `on: [push]` workflow runs
# Ref: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
# Ref: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-using-ssh-deploy-keys
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Expo CLI
run: npm install --global expo-cli
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Save existing Jest version to restore later
id: check-jest-version
run: echo JEST_VERSION=$(yq '.devDependencies.jest' package.json) >> $GITHUB_OUTPUT
- name: Upgrade packages to latest version supported by Expo SDK
run: expo upgrade
- name: Fix any incorrect dependency versions
run: npx expo install --fix
- name: Diagnose any problems
run: npx expo-doctor
# Jest is managed by Expo SDK version, but we
# want to manage the version to keep tests stable
- name: Restore versions to some managed Expo SDK packages which we manage
run: yarn add jest@${{ steps.check-jest-version.outputs.JEST_VERSION }} --dev --exact
- name: Deduplicate packages in yarn.lock
run: npx yarn-deduplicate yarn.lock
- name: Commit and create PR
uses: peter-evans/create-pull-request@v4
with:
branch: 'expo-upgrade-packages'
title: 'Upgrade packages to versions with Expo SDK support'
commit-message: 'Upgrade packages to versions with Expo SDK support'
body: 'Automated upgrade of packages to versions that are supported by current version of Expo SDK'