-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 929 Bytes
/
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
name: Publish Package to npmjs
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- name: Auto Test with Coverage
run: npm run coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
directory: ./coverage
- name: Create Release and Upload Release Asset
run: npm i -g github-release-from-changelog && github-release-from-changelog
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish to NPMJS
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}