Bump version #159
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| id-token: write # Required for npm Trusted Publishing (OIDC) | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| name: 'Build & Test' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile | |
| - name: Build | |
| run: yarn run build | |
| - name: Run Tests | |
| run: yarn test | |
| - name: Upload artifacts for publishing | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: dist | |
| path: dist/ | |
| publish: | |
| name: Publish to NPM registry if version changed | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Check if version has been updated | |
| id: check | |
| uses: EndBug/version-check@v2 | |
| - name: Download dist artifact | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish to npm | |
| if: github.ref == 'refs/heads/master' && steps.check.outputs.changed == 'true' | |
| run: npm publish --ignore-scripts --access public |