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

Upgrade pnpm version #249

Merged
merged 2 commits into from
Apr 25, 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
104 changes: 52 additions & 52 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
name: Changesets

on:
push:
branches: ["main"]
push:
branches: [ "main" ]
env:
CI: true
CI: true

jobs:
version:
runs-on: ubuntu-latest
permissions:
id-token: write # required for provenance https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Create release Pull Request or publish to NPM
uses: changesets/action@v1
with:
commit: "ci(changesets): version packages"
title: "Changeset: New Version"
publish: pnpm run ci-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.WORKLEAP_NPM_TOKEN }}
version:
runs-on: ubuntu-latest
permissions:
id-token: write # required for provenance https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Create release Pull Request or publish to NPM
uses: changesets/action@v1
with:
commit: "ci(changesets): version packages"
title: "Changeset: New Version"
publish: pnpm run ci-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.WORKLEAP_NPM_TOKEN }}
108 changes: 54 additions & 54 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,67 +14,67 @@ on:
- changeset-release/*

concurrency:
group: chromatic-${{ github.head_ref || github.ref }}
cancel-in-progress: true
group: chromatic-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
chromatic:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 0
chromatic:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build Packages
run: pnpm build:pkg
- name: Build Packages
run: pnpm build:pkg

- name: Publish to Chromatic
uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
traceChanged: true
onlyChanged: true # TurboSnap
exitOnceUploaded: true # The PRs will be marked as success/failure based on the Chromatic build status
skip: ${{ github.event.pull_request.draft == true }}
- name: Publish to Chromatic
uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
traceChanged: true
onlyChanged: true # TurboSnap
exitOnceUploaded: true # The PRs will be marked as success/failure based on the Chromatic build status
skip: ${{ github.event.pull_request.draft == true }}

- name: Write to Github comment
uses: thollander/actions-comment-pull-request@v2
with:
message: |
[View Storybook](${{ steps.chromatic.outputs.storybookUrl }})
comment_tag: storybook_url
if: github.event_name == 'pull_request'
- name: Write to Github comment
uses: thollander/actions-comment-pull-request@v2
with:
message: |
[View Storybook](${{ steps.chromatic.outputs.storybookUrl }})
comment_tag: storybook_url
if: github.event_name == 'pull_request'
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: CI

on:
push:
branches: ["main"]
branches: [ "main" ]
pull_request:
branches: ["main"]
branches: [ "main" ]

env:
CI: true
Expand All @@ -32,7 +32,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "git+https://github.com/gsoft-inc/wl-hopper.git"
},
"packageManager": "pnpm@8.6.2",
"packageManager": "pnpm@9.0.6",
"scripts": {
"doc:start": "pnpm --filter=docs dev",
"doc:storybook": "pnpm --filter=docs storybook",
Expand Down
Loading
Loading