diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 460b0e9..ebaa2a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,16 +11,19 @@ jobs: name: production url: https://www.npmjs.com/package/@benjc/rehype-scroll-to-top steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: "18.x" + node-version: "20.x" registry-url: "https://registry.npmjs.org" + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Run install - run: npm ci + run: pnpm ci - name: Run build - run: npm run build + run: pnpm run build - name: Run publish - run: npm publish --access=public + run: pnpm publish --access=public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf4181e..9042123 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,16 +18,19 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Run install - run: npm ci + run: pnpm i - name: Run lint - run: npm run lint + run: pnpm run lint - name: Run unit tests - run: npm test + run: pnpm test - name: Run build - run: npm run build + run: pnpm run build - name: Generate coverage file - run: npm run coverage + run: pnpm run coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: