-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (50 loc) · 1.52 KB
/
publish-npm.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Publish notehub-js to npm
on:
release:
types: [created]
jobs:
npm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src
steps:
- name: Checkout code
uses: actions/checkout@v3
# https://github.com/marketplace/actions/auto-changelog
# require commit format are "type(category): description [flag]"
- name: Generate release changelog
uses: ardalanamini/auto-changelog@v3
id: changelog
with:
github-token: ${{ github.token }}
commit-types: |
breaking: Breaking Changes
feat: New Features
fix: Bug Fixes
revert: Reverts
perf: Performance Improvements
refactor: Refactors
deps: Dependencies
docs: Documentation Changes
style: Code Style Changes
build: Build System
ci: Continuous Integration
test: Tests
chore: Chores
other: Other Changes
default-commit-type: Other Changes
mention-authors: true
include-compare: true
mention-new-contributors: true
- name: Setup .npmrc file to publish to npm
uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}