name: build on: push: branches: [ master ] pull_request: branches: [ master ] types: [ opened, synchronize ] jobs: verify: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: matrix: node-version: [ 12.x, 14.x, 16.x ] steps: - uses: actions/checkout@v2 - name: Setup firefox uses: browser-actions/setup-firefox@latest with: firefox-version: latest-devedition - run: firefox --version - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Setup Node Modules uses: bahmutov/npm-install@v1 env: CHROMEDRIVER_FILEPATH: "/usr/bin/chromedriver" - run: xvfb-run npm run verify env: CI: true - uses: actions/upload-artifact@v2 if: matrix.node-version == '14.x' with: name: artifacts path: | lib .nyc_output reports release: needs: [ verify ] runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 - name: Use Node.js 14.x uses: actions/setup-node@v2 with: node-version: 14.x - name: Setup Node Modules uses: bahmutov/npm-install@v1 env: CHROMEDRIVER_FILEPATH: "/usr/bin/chromedriver" - uses: actions/download-artifact@v2 with: name: artifacts - run: npm run publish:reports env: COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} - run: npx semantic-release env: NPM_TOKEN: ${{secrets.NPM_TOKEN}} GH_TOKEN: ${{secrets.GH_TOKEN}}