Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 13 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,65 +22,41 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: '22'
- name: Cache node_modules
node-version: '24'
- name: Cache npm
uses: actions/cache@v6
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
key: ${{ runner.os }}-node24-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node24-npm-
- run: npm ci
- run: npm run lint

build:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['22', '24']
node: ['22', '24', '26']
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
- name: Cache node_modules
uses: actions/cache@v6
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-
- run: npm ci
- run: npm run build

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: '22'
- name: Cache node_modules
- name: Cache npm
uses: actions/cache@v6
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
key: ${{ runner.os }}-node${{ matrix.node }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node${{ matrix.node }}-npm-
- run: npm ci
- run: npm run test:unit

publish-npm:
needs: [build,test]
needs: [lint, test]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
Expand All @@ -92,7 +68,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: '22'
node-version: '24'
registry-url: https://registry.npmjs.org/

# Only publish a tag whose version matches package.json, so a stray or
Expand Down Expand Up @@ -122,4 +98,4 @@ jobs:
- run: npm publish --provenance --access public
if: ${{ !contains(github.ref, 'next') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
24
Loading