Skip to content

Yarn Upgrade

Yarn Upgrade #178

Workflow file for this run

name: Yarn Upgrade
on:
schedule:
# Every wednesday at 13:37 UTC
- cron: 37 13 * * 3
workflow_dispatch: {}
jobs:
upgrade:
name: Yarn Upgrade
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Locate Yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore Yarn cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |-
${{ runner.os }}-yarn-
- name: Install Tools
run: |-
npm -g install npm-check-updates@^9.0.0
- name: Run "ncu -u"
# We special-case typescript because it's not semantically versioned
run: |-
# Upgrade dependencies at repository root
ncu --upgrade --filter=typescript --target=patch
ncu --upgrade --reject=typescript --target=minor
# This will create a brand new `yarn.lock` file (this is more efficient than `yarn install && yarn upgrade`)
- name: Run "yarn install --force"
run: yarn install --force
- name: Make Pull Request
uses: peter-evans/create-pull-request@v3
with:
# Git commit details
branch: automation/yarn-upgrade
commit-message: |-
chore: npm-check-updates && yarn upgrade
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
# Pull Request details
title: 'chore: npm-check-updates && yarn upgrade'
body: |-
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
labels: dependencies
token: ${{secrets.AUTOMATION_TOKEN}}