semantic-release
AboutGitHubNeed Help?
next
next
  • Introduction
  • Usage
    • Getting started
    • Installation
    • CI Configuration
    • Configuration
    • Plugins
    • Workflow configuration
    • Shareable configurations
  • Extending
    • Plugins
    • Shareable configuration
  • Recipes
    • CI configurations
      • CircleCI 2.0
      • Travis CI
      • GitLab CI
    • Git hosted services
      • Git authentication with SSH keys
    • Package managers and languages
  • Developer guide
    • JavaScript API
    • Plugin development
    • Shareable configuration development
  • Support
    • Resources
    • Frequently Asked Questions
    • Troubleshooting
    • Node version requirement
    • Node Support Policy
Powered by GitBook
On this page
  • Environment variables
  • Multiple Node jobs configuration
  • .circleci/config.yml configuration for multiple Node jobs
  • package.json configuration for multiple Node jobs
Edit on Git
  1. Recipes
  2. CI configurations

CircleCI 2.0

PreviousCI configurationsNextTravis CI

Last updated 5 years ago

Environment variables

The environment variables can be configured in ..

Alternatively, the default NPM_TOKEN and GH_TOKEN can be easily .

Multiple Node jobs configuration

.circleci/config.yml configuration for multiple Node jobs

This example is a minimal configuration for semantic-release with a build running Node 6 and 8. See for additional configuration options.

This example create the workflows test_node_4, test_node_6, test_node_8 and release. The release workflows will .

version: 2
jobs:
  test_node_6:
    docker:
      - image: circleci/node:6
    steps:
      # Configure your test steps here (checkout, npm install, cache management, tests etc...)

  test_node_8:
    docker:
      - image: circleci/node:8
    steps:
      # Configure your test steps here (checkout, npm install, cache management, tests etc...)

  release:
    docker:
      - image: circleci/node:8
    steps:
      - checkout
      - run: npm install
      # Run optional required steps before releasing
      # - run: npm run build-script
      - run: npx semantic-release

workflows:
  version: 2
  test_and_release:
    # Run the test jobs first, then the release only when all the test jobs are successful
    jobs:
      - test_node_6
      - test_node_8
      - release:
          requires:
            - test_node_6
            - test_node_8

package.json configuration for multiple Node jobs

{
  "devDependencies": {
    "semantic-release": "^15.0.0"
  }
}

A package.json is required only for semantic-release installation.

CircleCi Project Settings
CircleCI documentation
setup with semantic-release-cli
Authentication
run semantic-release only after the all the test_node_* are successful
local