fix: react 19 support #967
Workflow file for this run
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: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node: ['16.x'] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Use Node ${{ matrix.node }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install deps and build (with cache) | |
| uses: bahmutov/npm-install@v1 | |
| - name: Lint | |
| run: yarn lint | |
| - name: Test | |
| run: yarn test --ci --coverage --maxWorkers=2 | |
| publish-module: | |
| name: 'Publish Module to NPM on Node ${{ matrix.node }} and ${{ matrix.os }}' | |
| needs: build | |
| if: github.repository == 'jorisre/react-screen-wake-lock' && (github.ref =='refs/heads/main') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: 'Use Node ${{ matrix.node }}' | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '${{ matrix.node }}' | |
| registry-url: 'https://registry.npmjs.org/' | |
| - name: Install dependencies | |
| uses: bahmutov/npm-install@v1 | |
| - name: Build | |
| run: yarn build | |
| - name: Publish | |
| run: npx semantic-release --branches main | |
| env: | |
| NODE_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}' | |
| GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' |