forked from BarrySkidmore/aims-client-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ps_spec.yml
42 lines (40 loc) · 1.33 KB
/
ps_spec.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
version: 1.0
service_name: aims-client
stages:
-
name: PR Test
when:
- pull_request
image: node:13
compute_size: small
commands:
- npm install
# - npm install puppeteer
# - export CHROME_BIN=$(node -e "console.log(require('puppeteer').executablePath())")
# - npm run test
- npm run lint
- npm run build
- npx madge --circular --extensions ts --ts-config tsconfig.json src
-
name: Master Push - Publish
when:
- push: ['master']
image: node:13
compute_size: small
commands:
- npm install
- echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > .npmrc
- npm whoami
- |
set -ex
PKGNAME=$(node -e 'console.log(require("./package.json").name)')
PKGVERSION=$(node -e 'console.log(require("./package.json").version)')
WORDCOUNT=$(npm view "${PKGNAME}@${PKGVERSION}" | wc -c)
if [ "$WORDCOUNT" -eq 0 ]; then
echo "PUBLISHING $PKGNAME $PKGVERSION"
npm run build
npm publish --access public
else
echo "NOT PUBLISHING $PKGNAME $PKGVERSION"
fi
- echo done