chore: update main branch #28
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: 'π Publish new release' | |
on: | |
push: | |
branches: [master] | |
jobs: | |
coverage: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout git repository | |
uses: actions/checkout@v3 | |
- name: π’ Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: π Install dependencies | |
run: npm install | |
- name: βοΈ Create coverage | |
run: npm run test:coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} | |
- name: π¨ Send report to Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
ci: | |
runs-on: ${{matrix.os}} | |
needs: coverage | |
strategy: | |
max-parallel: 24 | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node-version: [14.x, 16.x] | |
steps: | |
- name: π Checkout git repository | |
uses: actions/checkout@v3 | |
- name: π’ Setup Node.js ${{matrix.node-version}} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{matrix.node-version}} | |
- name: π Install Node.js dependencies | |
run: npm install | |
- name: π€ Run tests | |
run: npm run test | |
publish: | |
name: 'π Publish' | |
needs: [coverage, ci] | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout git repository | |
uses: actions/checkout@v3 | |
- name: π’ Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: π Install dependencies | |
run: npm install | |
- name: π¦ Publish package to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |