Upgrade Expo packages #185
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: 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 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
# 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 }} | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 'latest' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Expo CLI | |
run: npm install --global expo-cli | |
- 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: pnpm update expo --latest | |
- 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: pnpm add jest@${{ steps.check-jest-version.outputs.JEST_VERSION }} --save-dev --save-exact | |
- name: Commit and create PR | |
uses: peter-evans/create-pull-request@v7 | |
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' |