Skip to content

Commit

Permalink
Add npm publishing (#124)
Browse files Browse the repository at this point in the history
* Add npm publishing

* Use modified USWDS workflow, as documented by wiki Release_Process

* Use `production` for releases and `master` for development
  • Loading branch information
dmethvin-gov authored Jul 9, 2018
1 parent 9c27528 commit 263465a
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 2
jobs:
build:

common: &common
docker:
- image: circleci/node:8.11.3-browsers
working_directory: ~/us-forms-system
working_directory: ~/repo

jobs:
build:
<<: *common
steps:
- checkout # to working_directory
- run: 'sudo npm install -g npm@6'
Expand All @@ -16,4 +20,26 @@ jobs:
- ./node_modules
- run: npm run lint
- run: npm test
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples
- persist_to_workspace:
root: ~/repo
paths: .

deploy:
<<: *common
steps:
- attach_workspace:
at: ~/repo
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run: npm publish

workflows:
version: 2
build_and_deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: production

0 comments on commit 263465a

Please sign in to comment.