Skip to content

Commit

Permalink
chore: use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Nov 5, 2024
1 parent 881450e commit 42a7dda
Show file tree
Hide file tree
Showing 5 changed files with 3,691 additions and 5,530 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,25 @@ 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: 18
node-version: 20
check-latest: true
cache: 'npm'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install -g npm && npm install
- name: Build
run: npm run build
- run: npm install -g npm
- run: pnpm install
- run: pnpm run build
- 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
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,25 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js Latest
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: npm
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
cache: pnpm
- run: pnpm install
- run: pnpm run lint
test:
strategy:
matrix:
node: [14.x, 16.x, 18.x, 20.x, latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm install
- run: npm test
cache: pnpm
- run: pnpm install
- run: pnpm test
Loading

0 comments on commit 42a7dda

Please sign in to comment.