-
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (46 loc) · 1.17 KB
/
release.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
name: Release
on:
push:
tags:
- "*"
branches-ignore:
- "*"
pull_request:
tags: []
branches: []
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
name: Publish NPM
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
name: Installing Node.js v14.x
with:
node-version: 14.x
- name: Installing dependencies
run: |
npm install
- name: Lint the code
run: |
npm run lint
- name: Compile TypeScript
run: |
npm run build
- name: Execute tests
run: |
npm run test
- name: Compute GitHub tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Publish
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
npm version ${{ steps.tag.outputs.tag }}
npm publish --access=public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}