-
-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (37 loc) · 1.02 KB
/
publish.yml
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
33
34
35
36
37
name: Publish to npmjs.org.
run-name: ${{ github.actor }} publish ${{ github.ref_name }} to npmjs.org. 🚀🚀🚀
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
publish:
name: Publish to npmjs.org
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: npm i
- name: Run eslint
run: npm run lint
- name: Run prettier:check
run: npm run prettier:check
- name: Run test
run: npm run test:coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
git-branch: main
- name: Build
run: npm run build
- name: Publish ${{ github.ref_name }} to npmjs.org 🚀🚀🚀
run: npm publish