Skip to content

Commit

Permalink
[chore] Port Github workflow to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
amivanoff committed Jul 31, 2024
1 parent 490ab5f commit 7eb9864
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
node: ['22.x']
os: [ubuntu-latest, windows-latest]

steps:
Expand All @@ -25,11 +25,14 @@ jobs:
with:
node-version: ${{ matrix.node }}

- uses: pnpm/action-setup@v4
name: Install pnpm

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
run: pnpm install

- name: Lint
run: yarn lint
run: pnpm lint
# Did not work without local files with test data
# - name: Test
# run: yarn test --ci --coverage --maxWorkers=2
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn publish

- uses: pnpm/action-setup@v4

- run: pnpm install

- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"eslint"
]
},
"packageManager": "^pnpm@9.6.0",
"browser": {
"_process": false,
"fs": false,
Expand Down

0 comments on commit 7eb9864

Please sign in to comment.