Skip to content

CircleCI

The following config declares the release job and uses it in the build_and_release workflow. The release job will run at the end of each build and either release:

  • a new latest version from baseBranch
  • a canary build from a pull request (if your package manager plugin implements them)
version: 2

defaults: &defaults
  working_directory: ~/auto
  docker:
    - image: circleci/node:latest-browsers

jobs:
  install: # your install job

  release:
    <<: *defaults
    steps:
      - attach_workspace:
          at: ~/auto
      - run:
          name: Release
          command: npx auto shipit

workflows:
  version: 2
  build_and_release:
    jobs:
      - install

      - release:
          requires:
            - install
version: 2

defaults: &defaults
  working_directory: ~/auto
  docker:
    - image: circleci/node:latest-browsers

jobs:
  install: # your install job

  release:
    <<: *defaults
    steps:
      - attach_workspace:
          at: ~/auto
      - run:
          name: Release
          command: npx auto shipit

workflows:
  version: 2
  build_and_release:
    jobs:
      - install

      - release:
          requires:
            - install

Troubleshooting

If you are having problems make sure you have done the following:

  • GH_TOKEN is set
  • Any other secrets for plugins are set (Ex; NPM_TOKEN with the NPM plugin)

Problems pushing tags to github

Go to Settings -> Checkout SSH Keys -> Create and add YOUR_USERNAME user key. This will create a key with the ability to push to github.

Examples