message: chore(ci): add artifacts job to workflow
diff: @@ -106,14 +106,62 @@ jobs:
  echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
  yarn lerna publish --canary minor --dist-tag canary --no-push --no-git-tag-version --yes
  + artifacts:
  + docker:
  + - image: circleci/node:10.15-browsers
  + working_directory: ~/repo
  + steps:
  + - checkout
  + - run:
  + name: Install yarn
  + command: |
  + curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
  + # Reference:
  + # https://circleci.com/docs/2.0/env-vars/#example-configuration-of-environment-variables
  + echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> $BASH_ENV
  + - run:
  + name: Install dependencies
  + command: yarn install --offline --frozen-lockfile
  + - run:
  + name: Build packages
  + command: yarn build
  + - run:
  + name: Sync project dependency files
  + command: yarn sync
  + - run:
  + name: Push generated artifacts to GitHub
  + command: |
  + if [ -n "$(git status --porcelain)" ]; then
  + echo "Our git status is not clean. Checking in the following files:";
  + echo "$(git status --porcelain)";
  + git config --global credential.helper 'cache --timeout=120'
  + git config --global user.email "kennylam@protonmail.com"
  + git config --global user.name "kennylam"
  + git add -A
  + git commit -m "chore(project): sync generated files [skip ci]"
  + # Pipe to /dev/null to prevent any token leaks in CI output
  + git push -q \
  + https://{$GH_TOKEN}:@github.com:kennylam/ibm-dotcom-library.git \
  + master \
  + > /dev/null 2>&1
  + fi
  +
  workflows:
  version: 2
  main:
  jobs:
  - system
  + - artifacts:
  + requires:
  + - system
  + filters:
  + branches:
  + only:
  + - circleci-release
  - release:
  requires:
  - system
  + - artifacts
  filters:
  branches:
  only:
  @@ -121,6 +169,7 @@ workflows:
  - deploy:
  requires:
  - system
  + - artifacts
  filters:
  branches:
  ignore: /.*/
  