Skip to content

Commit

Permalink
Merge pull request #180 from storybookjs/update-pnpm
Browse files Browse the repository at this point in the history
Update `pnpm` to `v9` & improve CI
  • Loading branch information
JReinhold committed May 15, 2024
2 parents 7b9b259 + e7b32b4 commit 400f257
Show file tree
Hide file tree
Showing 6 changed files with 7,683 additions and 6,141 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
name: "Chromatic"
name: Chromatic
on: push
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/actions/checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3

# https://nodejs.org/api/corepack.html
- name: Enable corepack (for pnpm)
run: corepack enable

# https://github.com/actions/setup-node
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 20
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

# https://pnpm.io/cli/install
- name: Install Node.js dependencies with pnpm
run: >
pnpm install
--frozen-lockfile
- name: Build package
run: >
pnpm run build
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
# https://github.com/actions/checkout
- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags
Expand All @@ -17,16 +18,22 @@ jobs:
git config --global user.name 'storybook-bot'
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
# https://nodejs.org/api/corepack.html
- name: Enable corepack (for pnpm)
run: corepack enable

- name: Install dependencies
uses: pnpm/action-setup@v2
# https://github.com/actions/setup-node
- name: Setup Node.js
uses: actions/setup-node@v4
with:
version: 8
run_install: true
cache: pnpm
node-version: 20

# https://pnpm.io/cli/install
- name: Install Node.js dependencies with pnpm
run: >
pnpm install
--frozen-lockfile
- name: Create Release
env:
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "MIT",
"type": "module",
"main": "./dist/index.js",
"packageManager": "pnpm@9.1.1",
"types": "./dist/index.d.ts",
"exports": {
".": {
Expand Down Expand Up @@ -87,6 +88,7 @@
"svelte-check": "^3.5.0",
"svelte-jester": "^2.3.2",
"svelte-loader": "^3.1.7",
"svelte-package": "^0.1.0",
"typescript": "^5.1.6",
"vite": "^4.4.3",
"vitest": "^0.33.0"
Expand Down
Loading

0 comments on commit 400f257

Please sign in to comment.