Skip to content

added check for master #1706

added check for master

added check for master #1706

Workflow file for this run

name: Node CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16, 18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
architecture: x64
- name: npm install, build, and test
run: |
npm ci
npm run build:prod
npm test
env:
CI: true
- name: lint
run: |
npm run lint:js
npm run lint:css
env:
CI: true
publish:
environment: production
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
architecture: x64
- run: npm ci
- run: npm run build:prod
- run: npm test
- uses: JS-DevTools/npm-publish@v1
id: publishNpm
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: false
- run: gh release create ${{ steps.publishNpm.outputs.version }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}