Skip to content

Commit

Permalink
chore: update github actions to v4 to utilize node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
4upz committed May 24, 2024
1 parent b816e55 commit f25d1b1
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
node-version: [18.x, 20.x]
name: Install ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# Cache every node_modules folder inside the monorepo
- name: cache all node_modules
id: cache-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
# We use both yarn.lock and package.json as cache keys to ensure that changes to local monorepo packages bust the cache
Expand All @@ -45,7 +45,7 @@ jobs:
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache global yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand Down Expand Up @@ -82,17 +82,17 @@ jobs:
node-version: [18.x, 20.x]
name: Build ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# Cache every node_modules folder inside the monorepo
- name: cache all node_modules
id: cache-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
# We use both yarn.lock and package.json as cache keys to ensure that changes to local monorepo packages bust the cache.
Expand All @@ -102,7 +102,7 @@ jobs:
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache global yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
yarn lerna run build:update
- name: zip artifact
run: zip dist-workspace.zip dist-workspace/* -r
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist-workspace
path: dist-workspace.zip
Expand All @@ -145,16 +145,16 @@ jobs:
CI: 'true'
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
- name: use node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: cache all node_modules
id: cache-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
Expand All @@ -163,7 +163,7 @@ jobs:
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache global yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand Down Expand Up @@ -274,8 +274,8 @@ jobs:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
MONGODB_CREDENTIALS: ${{ secrets.MONGODB_CREDENTIALS }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dist-workspace
- name: unzip artifact for deployment
Expand Down Expand Up @@ -359,8 +359,8 @@ jobs:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
MONGODB_CREDENTIALS: ${{ secrets.MONGODB_CREDENTIALS }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dist-workspace
- name: unzip artifact for deployment
Expand Down

0 comments on commit f25d1b1

Please sign in to comment.