Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add npm publish job to circle ci #647

Merged
merged 1 commit into from
Jan 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ test_fixtures_cache_key: &test_fixtures_cache_key test-fixtures-cache-{{ .Enviro
test_env: &test_env
GCLOUD_PROJECT: 0
GCLOUD_TRACE_NEW_CONTEXT: 1
release_tags: &release_tags
tags:
only: /^v\d+(\.\d+){2}(-.*)?$/

# Unit test workflow.

Expand Down Expand Up @@ -77,10 +80,24 @@ workflows:
version: 2
tests:
jobs:
- node4
- node6
- node8
- node9
- node4:
filters: *release_tags
- node6:
filters: *release_tags
- node8:
filters: *release_tags
- node9:
filters: *release_tags
- publish_npm:
requires:
- node4
- node6
- node8
- node9
filters:
branches:
ignore: /.*/
<<: *release_tags

jobs:
node4:
Expand Down Expand Up @@ -119,3 +136,18 @@ jobs:
- *postgres_service
- *mysql_service
<<: *unit_tests
publish_npm:
docker:
- image: node:8
user: node
steps:
- checkout
- run:
name: Set NPM authentication.
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

This comment was marked as spam.

This comment was marked as spam.

- run:
name: Install modules and dependencies.
command: npm install
- run:
name: Publish the module to npm.
command: npm publish