-
-
Notifications
You must be signed in to change notification settings - Fork 12
81 lines (67 loc) · 2.08 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
# build / test
Build:
name: Build Package
runs-on: ubuntu-latest
steps:
# Checkout Repo
- uses: actions/checkout@v2
# Setup Node
- uses: actions/setup-node@v2
with:
node-version: 14
# Install Dependencies
- run: npm ci
# Build Package
- run: npm run build
# Run Tests
- run: npm run test:coverage
# Report Coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# create / release
Release:
needs: Build
name: Create Release Package
runs-on: ubuntu-latest
steps:
# Checkout Repo
- uses: actions/checkout@v2
# Setup Node
- uses: actions/setup-node@v2
with:
node-version: 14
# Show current package
- name: cat package.json
run: cat ./package.json
# Install Dependencies
- run: npm ci
# Build package
- run: npm run build
# Bump version, tag commit and generate a changelog
- name: Conventional Changelog Action
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
git-message: 'chore(release): {version}'
tag-prefix: 'v'
output-file: 'CHANGELOG.md'
release-count: '10'
skip-on-empty: 'false'
skip-version-file: 'false'
skip-commit: 'false'
# Publish to NPM
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}