Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/actions/setup-node-and-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Setup Node.js and Install Dependencies'
description: 'Sets up Node.js, caches dependencies, and installs packages for Storybook'

runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Update npm to latest
shell: bash
run: npm install -g npm@latest

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1

- name: Install script dependencies
shell: bash
working-directory: scripts
run: yarn install
130 changes: 0 additions & 130 deletions .github/workflows/canary-release-pr.yml

This file was deleted.

23 changes: 4 additions & 19 deletions .github/workflows/prepare-non-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,11 @@ jobs:
fetch-depth: 10000
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Setup Node.js and Install Dependencies
uses: ./.github/actions/setup-node-and-install

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1

- name: Install Dependencies
working-directory: .
run: |
yarn task --task=install
- name: Install code dependencies
run: cd ../code && yarn install

- name: Check if pull request is frozen
if: github.event_name != 'workflow_dispatch'
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,11 @@ jobs:
ref: main
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Setup Node.js and Install Dependencies
uses: ./.github/actions/setup-node-and-install

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1

- name: Install Dependencies
working-directory: .
run: |
yarn task --task=install
- name: Install code dependencies
run: cd ../code && yarn install

- name: Check if pull request is frozen
if: github.event_name != 'workflow_dispatch'
Expand Down
Loading
Loading