semantic-release / Cli

Licence: mit
🆑📍 Setup automated semver compliant package publishing

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Cli

Semantic Release
📦🚀 Fully automated version management and package publishing
Stars: ✭ 14,364 (+5180.88%)
Mutual labels:  automation, version, publish, package, release, changelog, semver
Release It
🚀 Automate versioning and package publishing
Stars: ✭ 4,773 (+1654.78%)
Mutual labels:  automation, publish, release, changelog, semver
perfekt
Release, changelog and version your packages with perfe(k)t 👌 ease!
Stars: ✭ 15 (-94.49%)
Mutual labels:  changelog, semver, version, release
Bump
Bump updates the project's version, updates/creates the changelog, makes the bump commit, tags the bump commit and makes the release to GitHub. Opinionated but configurable.
Stars: ✭ 327 (+20.22%)
Mutual labels:  automation, version, release, changelog
Changelog
📘 semantic-release plugin to create or update a changelog file
Stars: ✭ 142 (-47.79%)
Mutual labels:  version, release, changelog
Npm
🚢 semantic-release plugin to publish a npm package
Stars: ✭ 103 (-62.13%)
Mutual labels:  version, publish, release
Github
semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues
Stars: ✭ 159 (-41.54%)
Mutual labels:  version, publish, release
Shipjs
Take control of what is going to be your next release.
Stars: ✭ 668 (+145.59%)
Mutual labels:  automation, release, semver
Please
please is semver release made easy
Stars: ✭ 72 (-73.53%)
Mutual labels:  automation, release, semver
exec
🐚 semantic-release plugin to execute custom shell commands
Stars: ✭ 94 (-65.44%)
Mutual labels:  version, release, publish
git
🔀 semantic-release plugin to commit release assets to the project's git repository
Stars: ✭ 235 (-13.6%)
Mutual labels:  changelog, version, release
version-check
An action that allows you to check whether your npm package version has been updated
Stars: ✭ 65 (-76.1%)
Mutual labels:  package, semver, version
Python Semver
Python package to work with Semantic Versioning (http://semver.org/)
Stars: ✭ 264 (-2.94%)
Mutual labels:  version, release, semver
Standard Version
🏆 Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
Stars: ✭ 5,806 (+2034.56%)
Mutual labels:  version, release, changelog
Commit Analyzer
💡 semantic-release plugin to analyze commits with conventional-changelog
Stars: ✭ 146 (-46.32%)
Mutual labels:  publish, release, changelog
Release Notes Generator
📋 semantic-release plugin to generate changelog content with conventional-changelog
Stars: ✭ 123 (-54.78%)
Mutual labels:  publish, release, changelog
Gh Release
Create a github release for a node package.
Stars: ✭ 132 (-51.47%)
Mutual labels:  release, changelog, semver
change
A simple tool that automates generating and updating a changelog
Stars: ✭ 47 (-82.72%)
Mutual labels:  changelog, semver, release
wisdom
🎁 Tool for publishing releases to github and npm
Stars: ✭ 16 (-94.12%)
Mutual labels:  changelog, release, publish
next-ver
Tells you the next semantic version for your local package
Stars: ✭ 27 (-90.07%)
Mutual labels:  semver, version, release

semantic-release-cli

[Build Status](https://github.com/semantic-release/cli/actions?query=workflow%3ATest+

Install

npm install -g semantic-release-cli

cd your-module
semantic-release-cli setup

dialogue

Options

Usage:
  semantic-release-cli setup [options]

Options:
  -h --help           Show this screen.
  -v --version        Show version.
  --[no-]keychain     Use keychain to get passwords [default: true].
  --ask-for-passwords Ask for the passwords even if passwords are stored [default: false].
  --tag=<String>      npm tag to install [default: 'latest'].
--gh-token=<String>  GitHub auth token
--npm-token=<String> npm auth token
--circle-token=<String> CircleCI auth token
--npm-username=<String>  npm username

Aliases:
  init                 setup

What it Does

semantic-release-cli performs the following steps:

  1. Asks for the information it needs. You will need to provide it with:
    • Whether your GitHub repository is public or private
    • Which npm registry you want to use (Default: https://registry.npmjs.org/)
    • Your npm username (unless passwords were previously saved to keychain)
    • Your npm email
    • Your npm password
    • Which continuous integration system you want to use. (Options: Travis CI / Pro / Enterprise / CircleCI, or Other)
    • [Travis only] Whether you want to test a single node.js version (e.g. - 8) or multiple node.js versions (e.g. - 4, 6, 8, etc.)
  2. npm Add User
    • Runs npm adduser with the npm information provided to generate a .npmrc
    • Parses the npm token from the .npmrc for future use
  3. Uses user supplied GitHub Personal Access Token (with the following permissions: repo, read:org, repo:status, repo_deployment, user:email, write:repo_hook)
    • Sets GitHub Personal Access Token in user choosen CI/CD environment variable
  4. Update your package.json
    • Set version field to 0.0.0-development (semantic-release will set the version for you automatically)
    • Add a semantic-release script: "semantic-release": "semantic-release"
    • Add semantic-release as a devDependency
    • Add or overwrite the repository field

Travis CI

Versions 4.1.0+

semantic-release-cli does not perform any additional Travis-specific steps, but the cli output will provide a link for assistance integrating Travis and semantic-release-cli.

Prior to version 4.1.0

semantic-release-cli performs the following additional steps:

  1. Overwrite your .travis.yml file
    • after_success: npm install -g travis-deploy-once and travis-deploy-once "npm run semantic-release": run semantic-release exactly once after all builds pass
    • Set other sane defaults: cache: directories: ~/.npm, notifications: email: false
  2. Login to Travis CI to configure the package. This step requires your module to define a valid, case-sensitive repository field.
    • Enable builds of your repo
    • Add GH_TOKEN and NPM_TOKEN environment variables in the settings

CircleCI

For CircleCI, semantic-release-cli performs the following additional steps:

  1. Create minimal config.yml file (if CircleCI was selected)
version: 2
jobs:
  build:
    docker:
      - image: 'circleci/node:latest'
    steps:
      - checkout
      - run:
        name: install
        command: npm install
      - run:
        name: release
        command: npm run semantic-release || true
  1. Login to CircleCI to configure the package
    • Enable builds of your repo
    • Add GH_TOKEN and NPM_TOKEN environment variables in the settings

Github Actions

For Github Actions, semantic-release-cli performs the following additional step:

  • Login to Github to configure the package
  • Add NPM_TOKEN environment variables as a secret in the settings

For now you will have to manually modify your existing workflow to add a release step. Here is an example of a small complete workflow .github/workflows/workflow.yml:

name: CI
on: push
jobs:
  test:
    runs-on: ubuntu-16.04
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: '12'
      - run: npm ci
      - run: npm test
      - name: Release
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release

Other CI Servers

By default, semantic-release-cli supports the popular Travis CI and CircleCI servers. If you select Other as your server during configuration, semantic-release-cli will print out the environment variables you need to set on your CI server. You will be responsible for adding these environment variables as well as configuring your CI server to run npm run semantic-release after all the builds pass.

Note that your CI server will also need to set the environment variable CI=true so that semantic-release will not perform a dry run. (Most CI services do this by default.) See the semantic-release documentation for more details.

Setting defaults

This package reads your npm username from your global .npmrc. In order to autosuggest a username in the future, make sure to set your username there: npm config set username <username>.

Contribute

Please contribute! We welcome issues and pull requests.

When committing, please conform to the semantic-release commit standards.

License

MIT License 2015 © Christoph Witzko and contributors

https://twitter.com/trodrigues/status/509301317467373571

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].