Skip to content

Commit

Permalink
Migrate to pnpm 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Mors committed Jan 8, 2024
1 parent fe125b7 commit 005c517
Show file tree
Hide file tree
Showing 15 changed files with 5,355 additions and 12,740 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,40 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- run: npm ci
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
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
run: pnpm install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
30 changes: 27 additions & 3 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,37 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
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
run: pnpm install

- run: npm run build:prod

- run: npm run lint

- name: Upload artifact
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,40 @@ jobs:

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
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
run: pnpm install

- name: Build project
run: |
npm ci
npm run build:prod
npm run zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -33,6 +61,7 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Source build
id: upload-source-build
uses: actions/upload-release-asset@v1
Expand All @@ -43,6 +72,7 @@ jobs:
asset_path: ./dist/source.zip
asset_name: source.zip
asset_content_type: application/zip

- name: Upload Firefox release
id: upload-firefox-release
uses: actions/upload-release-asset@v1
Expand All @@ -53,6 +83,7 @@ jobs:
asset_path: ./dist/firefox.zip
asset_name: firefox.zip
asset_content_type: application/zip

- name: Upload Chrome release
id: upload-chrome-release
uses: actions/upload-release-asset@v1
Expand All @@ -63,6 +94,7 @@ jobs:
asset_path: ./dist/chrome.zip
asset_name: chrome.zip
asset_content_type: application/zip

- name: Upload Edge release
id: upload-edge-release
uses: actions/upload-release-asset@v1
Expand Down
Loading

0 comments on commit 005c517

Please sign in to comment.