Skip to content

Commit b410d4c

Browse files
committed
Add autopublish step to CI
1 parent 94e1391 commit b410d4c

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

.circleci/config.yml

+23-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ jobs:
4141
- attach_workspace: { at: . }
4242
- restore_cache:
4343
key: deps-{{ checksum "yarn.lock" }}
44-
- run:
45-
name: Run Linter (not enforcing for now)
46-
command: yarn lint || exit 0
4744
- run:
4845
name: Run Tests
4946
command: yarn test
@@ -70,6 +67,20 @@ jobs:
7067
name: Snyk Setup
7168
command: curl -sL https://raw.githubusercontent.com/segmentio/snyk_helpers/master/initialization/snyk.sh | sh
7269

70+
publish:
71+
docker:
72+
- image: ${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/analytics.js-integrations-ci
73+
steps:
74+
- attach_workspace: { at: . }
75+
- restore_cache:
76+
key: deps-{{ checksum "yarn.lock" }}
77+
- run:
78+
name: Authenticate npm
79+
command: npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH
80+
- run:
81+
name: Publish packages
82+
command: yarn lerna publish from-package --yes
83+
7384
workflows:
7485
version: 2
7586
test:
@@ -90,3 +101,12 @@ workflows:
90101
context: snyk
91102
requires:
92103
- setup
104+
- publish:
105+
context: npm
106+
requires:
107+
- test
108+
- test_saucelabs
109+
- test_snyk
110+
filters:
111+
branches:
112+
only: master

lerna.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44
"version": "independent",
55
"packages": [
66
"integrations/*"
7-
]
7+
],
8+
"publish": {
9+
"ignoreChanges": [
10+
"*.md"
11+
]
12+
}
813
}

0 commit comments

Comments
 (0)