Skip to content

Commit

Permalink
refact: change package manager to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
lvcapoe committed Nov 16, 2023
1 parent 73c1829 commit fce5e5e
Show file tree
Hide file tree
Showing 5 changed files with 3,277 additions and 6,664 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
name: CI

on:
push:
branches:
- "**"
- '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- run: npm install
cache: 'pnpm'

- run: npm run lint && npm run test && npm run build
- run: pnpm install --frozen-lockfile
- run: pnpm run lint && pnpm run build
27 changes: 12 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Publish

on:
workflow_run:
workflows: ["CI"]
workflows: ['CI']
types:
- completed
push:
branches:
- "main"
- 'main'

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand All @@ -16,23 +15,21 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js and npm
uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm install
version: 7
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit fce5e5e

Please sign in to comment.