v3.2.0 #5
Workflow file for this run
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 to npm | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js from .nvmrc file | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
registry-url: 'https://registry.npmjs.org' | |
- name: Use latest stable Chrome | |
uses: browser-actions/setup-chrome@latest | |
with: | |
chrome-version: stable | |
- name: Install dependencies | |
run: npm run ci | |
- name: Run ESLint | |
run: npm run lint | |
- name: Run unit tests | |
run: npm run test:unit:ci | |
- name: Run visual regression tests | |
run: npm run test:visual:ci | |
- name: Save visual regression tests artifacts (on failure) | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: .loki | |
path: .loki/ | |
retention-days: 5 | |
- name: Publish (@latest) | |
run: npm publish --access public | |
if: ${{!github.event.release.prerelease}} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }} | |
- name: Publish (@next) | |
run: npm publish --access public --tag next | |
if: ${{github.event.release.prerelease}} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }} |