Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ executors:
default: "small"
working_directory: /tmp/storybook
docker:
- image: cimg/node:22.13.1
- image: cimg/node:22.22.0
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand All @@ -51,7 +51,7 @@ executors:
default: "small"
working_directory: /tmp/storybook
docker:
- image: cimg/node:22.13.1-browsers
- image: cimg/node:22.22.0-browsers
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand Down Expand Up @@ -384,7 +384,9 @@ jobs:
at: .
- run:
name: Enable Corepack
command: sudo corepack enable yarn
command: |
corepack enable
corepack prepare yarn@4.12.0 --activate
- run:
name: Starting Event Collector
command: yarn jiti ./event-log-collector.ts
Expand Down
42 changes: 42 additions & 0 deletions .github/actions/setup-node-and-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Setup Node.js and Install Dependencies'
description: 'Sets up Node.js, caches dependencies, and installs packages for Storybook'

inputs:
install-code-deps:
description: 'Whether to install code dependencies in addition to script dependencies'
required: false
default: 'false'

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
Comment on lines +22 to +31

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Redundant restore-key on line 29.

The first restore-key is identical to the primary key. Restore-keys are only consulted when the primary key doesn't match exactly, so this entry is never used.

Proposed fix
       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
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- 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: 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') }}
yarn-v1
🤖 Prompt for AI Agents
In @.github/actions/setup-node-and-install/action.yml around lines 22 - 31, The
restore-keys list in the "Cache dependencies" step for actions/cache@v4 contains
a redundant first entry identical to the primary key; remove that duplicate
restore-key so only the fallback restore-keys remain (the lines starting with
yarn-v1-${{ hashFiles('scripts/yarn.lock') }} and yarn-v1). Edit the
restore-keys block in the Cache dependencies step to drop the entry matching the
primary key while keeping the other, more general fallback keys to allow proper
cache fallback behavior.


- name: Install script dependencies
shell: bash
working-directory: scripts
run: yarn install

- name: Install code dependencies
if: inputs.install-code-deps == 'true'
shell: bash
working-directory: code
run: yarn install
14 changes: 14 additions & 0 deletions .github/workflows/publish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Releasing previous major release

## Preparation

1. `git checkout v8`
2. `git pull`
3. `git checkout -b hotfix/v<next-patch-release-version>`
4. Apply necessary hotfixes
5. `cd scripts && yarn release:version --deferred --release-type patch --verbose && cd .. && git add . && git commit -m "Bump deferred version"`
6. Add a new entry for the new version to the `CHANGELOG.md` file
7. Trigger canary release via dispatching the workflow for `publish-canary`
8. Test the canary release
9. Merge `hotfix/v<next-patch-release-version>` into `v8`
10. Observe the `publish-normal` job
Loading