Merge pull request #115 from saul-jb/fix/bloom-filter #185
This file contains 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 | |
pull_request: | |
branches: | |
- '**' | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
jobs: | |
check: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run lint | |
test-node: | |
if: github.event.pull_request.draft == false | |
needs: check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] # [windows-latest, ubuntu-latest, macos-latest] | |
node: [18] | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run test:node | |
env: | |
W3_TOKEN: ${{secrets.W3_TOKEN}} | |
- uses: codecov/codecov-action@v3 | |
with: | |
flags: node | |
# test-chrome: | |
# if: github.event.pull_request.draft == false | |
# needs: check | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# os: [ubuntu-latest] # [windows-latest, ubuntu-latest, macos-latest] | |
# node: [18] | |
# fail-fast: true | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node }} | |
# cache: 'npm' | |
# - run: npm ci | |
# - run: npm run test:chrome | |
# env: | |
# W3_TOKEN: ${{secrets.W3_TOKEN}} | |
# - uses: codecov/codecov-action@v3 | |
# with: | |
# flags: node | |
release: | |
runs-on: ubuntu-latest | |
# needs: [test-node, test-chrome] | |
needs: [test-node] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.event.pull_request.draft == false | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: node | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
# The logic below handles the npm publication: | |
# these if statements ensure that a publication only occurs when | |
# a new release is created: | |
- run: npm publish | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- run: | | |
npm version `node -p -e "require('./package.json').version"`-`git rev-parse --short HEAD` --no-git-tag-version | |
npm publish --tag next | |
if: ${{ !steps.release.outputs.release_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
name: release rc |