-
Notifications
You must be signed in to change notification settings - Fork 653
executable file
·63 lines (53 loc) · 1.62 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
60
61
62
63
name: Release
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
# Note that these steps are *identical* to build-and-test (with the caveat
# that build-and-test uses several versions of Node, and Release only uses
# 10.x) at least until the actual publishing happens. Ideally, we could
# delegate to the build- and-test workflow, but I haven't found a way to do
# that yet.
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-10.x-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-10.x-
${{ runner.os }}-npm-
- name: install
run: |
npm ci
# npm i --no-save ts-node typescript
npm run plugins:ci
- name: static checks
run: |
npm run lint
- name: build
run: |
npm run build
npm run plugins:build
- name: test
run: |
npm run test:smoke
npm run test
# npm run perf
# npm run test:types
# npm run test:stress
# And finally... publish it! Note that we create the .npmrc file
# "just in time" so that `npm publish` can get the auth token from the
# environment
- name: publish
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}