diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5f72fc5..88d4d5b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,24 +11,23 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: '.node-version' check-latest: true - cache: 'npm' + cache: 'pnpm' registry-url: 'https://registry.npmjs.org' - - name: Install dependencies - run: npm install -g npm && npm install + - run: npm install -g npm && pnpm install - name: Publish run: | if git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+$"; then - npm publish --provenance --access public + pnpm publish --provenance --access public elif git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+"; then - npm publish --tag next --provenance --access public + pnpm publish --tag next --provenance --access public else echo "Not a release, skipping publish" fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aa7cf0c..f0adfe9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,23 +8,20 @@ jobs: name: Lint & Test strategy: matrix: - node-version: [16, 18, 20, 22] + node-version: [18, 20, 22] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} check-latest: true - cache: 'npm' + cache: 'pnpm' registry-url: 'https://registry.npmjs.org' - - name: Install dependencies - run: npm install - - name: Lint - if: matrix.node-version == 22 - run: npm run lint - - name: Test - run: npm run test - - name: Build - run: npm run build + - run: pnpm install + - if: matrix.node-version == 22 + run: pnpm run lint + - run: pnpm run test + - run: pnpm run build