Merge pull request #95 from jackdomleo7/high-contrast #37
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: Pipeline | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Clean install npm dependencies | |
run: npm ci | |
- name: Check project can build successfully | |
run: npm run build | |
- name: Check git is still clean after building | |
run: npm run has-no-changes | |
- name: Check project linting | |
run: npm run lint:check | |
publish: | |
needs: [build] | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Clean install npm dependencies | |
run: npm ci | |
- name: Publish to npm | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
check-version: true |