Skip to content

Commit

Permalink
switch to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
winkerVSbecks committed Aug 1, 2024
1 parent 7b7232c commit 573ff49
Show file tree
Hide file tree
Showing 12 changed files with 14,561 additions and 11,240 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,26 @@ jobs:
# Job steps
steps:
- uses: actions/checkout@v1

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: yarn
# 👇 Adds Chromatic as a step in the workflow
run: pnpm install

- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,31 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install

- name: Lint
run: yarn lint
run: pnpm run lint

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
pnpm run release
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://tetra.chromatic.com
## Install

```console
yarn add @chromatic-com/tetra
pnpm add @chromatic-com/tetra
```

## To Do
Expand All @@ -22,13 +22,13 @@ yarn add @chromatic-com/tetra
Watch and rebuild code with `tsup` and runs Storybook to preview your UI during development.

```console
yarn storybook
pnpm run storybook
```

## Building

Build package with `tsup` for production.

```console
yarn build
pnpm run build
```
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@
},
"resolutions": {
"jackspeak": "2.1.1"
}
},
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
}
Loading

0 comments on commit 573ff49

Please sign in to comment.