-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 2.15 KB
/
cron-expo-install-new-versions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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'