-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (32 loc) · 819 Bytes
/
nodejs.yml
File metadata and controls
32 lines (32 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Node.js CI
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install npm dependencies
run: npm ci
- name: Perform code analyzer check
run: npm run lint
- name: Perform code format check
run: npm run format
- name: Publish tag to npm
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: npm publish