Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pnpm to v9 & improve CI #180

Merged
merged 9 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
JReinhold marked this conversation as resolved.
Show resolved Hide resolved

- 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 '[email protected]'

- 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": "[email protected]",
"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