-
-
Notifications
You must be signed in to change notification settings - Fork 38
71 lines (58 loc) · 1.6 KB
/
npm-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
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
name: NPM Publish
on:
push:
tags:
- "v*"
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
# PreInstall
- name: add gulp, codecov
run: npm install -g gulp-cli codecov
# Install, Build and Test
- name: yarn install, build and test
run: |
yarn --frozen-lockfile
yarn test -- --colors --forceExit
env:
CI: true
# NPM Publish
- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# Coverage
- name: Coverage
run: yarn coverage
- name: Publish codecov
run: codecov -f coverage/*.json
# TypeDoc
- name: Generate TypeDoc
run: yarn typedoc
- name: Publish generated content to GitHub Pages
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./docs
with:
keepFiles: true
# GitHub Release
- name: Package lib
run: npm pack
- name: GitHub Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: samsung-tv-control-*.tgz