Skip to content

Commit

Permalink
Added ps_spec.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnielsen committed Mar 18, 2020
1 parent a9b0909 commit 793ebfd
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions ps_spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 793ebfd

Please sign in to comment.