more readmes #82
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| node: [22, 20] | |
| platform: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: checkout | |
| uses: actions/checkout@v1 | |
| - name: Get npm cache directory | |
| id: npm-cache | |
| run: | | |
| echo "::set-output name=dir::$(npm config get cache)" | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.npm-cache.outputs.dir }} | |
| key: ${{ matrix.platform }}-node-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ matrix.platform }}-node-${{ matrix.node }} | |
| - name: install deps | |
| run: npm install | |
| - name: run tests | |
| run: npm run test | |
| - name: build library | |
| run: npm run build --ws --if-present |