Skip to content

Commit

Permalink
ci: remove pnpm/action-setup in favor of corepack (#222)
Browse files Browse the repository at this point in the history
* ci: remove pnpm/action-setup in favor of corepack

fix node version deprecation warning in github

* fix lint
  • Loading branch information
QuentinRoy authored Jan 31, 2024
1 parent 0a6a337 commit 4cdf380
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 85 deletions.
72 changes: 8 additions & 64 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Install Node.js 20.x.x
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 20.x.x
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install --frozen-lockfile
- run: pnpm run build-all
- uses: actions/upload-artifact@v4
Expand All @@ -46,26 +32,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Install Node.js 20.x.x
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 20.x.x
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
id: download
Expand All @@ -78,26 +50,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Install Node.js 20.x.x
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 20.x.x
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install --frozen-lockfile
- run: pnpm run lint

Expand All @@ -106,26 +64,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Install Node.js 20.x.x
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 20.x.x
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
id: download
Expand Down
23 changes: 2 additions & 21 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: corepack enable
- name: Install Node.js 20.x.x
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 20.x.x

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
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
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand Down

0 comments on commit 4cdf380

Please sign in to comment.