This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dara Hayes
committed
Nov 30, 2018
1 parent
b717b4c
commit f9eb819
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/aerogear | ||
docker: | ||
# Node 8 LTS | ||
- image: circleci/node:carbon | ||
steps: | ||
- checkout | ||
# Intentionally leaving out the caching bits first to look at build times | ||
# Without caching | ||
# - restore_cache: | ||
# key: dependency-cache-{{ checksum "package.json" }} | ||
- run: | ||
name: install dependencies | ||
command: npm install | ||
- run: | ||
name: bootstrap project | ||
command: npm run bootstrap | ||
- run: | ||
name: compile | ||
command: npm run compile | ||
# - save_cache: | ||
# key: dependency-cache-{{ checksum "package.json" }} | ||
# paths: | ||
# - ./node_modules | ||
# - run: | ||
# # Hoisting will cache some of the packages, but rest needs to be installed separtely | ||
# name: install-package-dependencies-after-cache | ||
# command: npm run bootstrap | ||
- run: | ||
name: run lint | ||
command: npm run lint | ||
- run: | ||
name: test | ||
command: npm test | ||
# - store_artifacts: | ||
# path: test-results.xml | ||
# prefix: tests | ||
# - store_artifacts: | ||
# path: coverage | ||
# prefix: coverage | ||
# - store_test_results: | ||
# path: test-results.xml | ||
npm_publish: | ||
working_directory: ~/aerogear | ||
docker: | ||
# Node 8 LTS | ||
- image: circleci/node:carbon | ||
steps: | ||
- checkout | ||
# Allows us to authenticate with the npm registry | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
- run: CI=true npm run release:prep | ||
- run: TAG=$CIRCLE_TAG npm run release:validate | ||
- run: npm run publish | ||
|
||
workflows: | ||
version: 2 | ||
build_and_release: | ||
jobs: | ||
- build: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- npm_publish: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /.*/ # allow anything because tag syntax is validated as part of validate-release.sh | ||
branches: | ||
ignore: /.*/ |