Upgrading #376
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: build | |
on: | |
- push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CODECOV_TOKEN: d4844aaf-4533-4d72-80df-65806ecb6591 | |
NPM_AUTH_TOKEN: ${{ secrets.QMBOT_NPM_TOKEN }} | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: install packages | |
run: yarn | |
- name: run linter | |
run: yarn lint | |
- name: build bundles | |
run: yarn build | |
- name: run tests | |
run: yarn test | |
- name: upload coverage | |
run: bash <(curl -s https://codecov.io/bash) | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release' }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.QMBOT_NPM_TOKEN }} | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@master | |
with: | |
node-version: 18.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: install packages | |
run: yarn | |
- name: build bundles | |
run: yarn build | |
- name: publish to npm | |
run: make publish |