Skip to content

Commit

Permalink
chore(repo): Cache extraneous node_module versions (#2085)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilewski authored Nov 8, 2023
1 parent 4ba666d commit b4c5c7b
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:

- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false

- name: Setup
id: config
Expand Down Expand Up @@ -84,8 +87,6 @@ jobs:
core.warning("Changeset in pre-mode should not prepare a ClerkJS production release")
}
- name: Generate notification payload
id: notification
if: steps.changesets.outputs.published == 'true'
Expand All @@ -101,4 +102,29 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CHANGELOG_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

# We're running the CI workflow (where node v20 modules are cached) in
# merge_group and not on main, we need to explicitly cache node_modules here so
# that follow-on branches can use the cached version of node_modules rather
# than recreating them every time.
cache-for-alternate-node-versions:
name: Cache for Alternate Node Versions
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
continue-on-error: true

strategy:
matrix:
version: [ 20 ] # NOTE: 18 is cached in the main release workflow

steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
show-progress: false

- name: Cache node_modules (Node v${{ matrix.version }})
uses: ./.github/actions/init
with:
node-version: ${{ matrix.version }}
turbo-team: ''
turbo-token: ''

0 comments on commit b4c5c7b

Please sign in to comment.