DEV Community

Cover image for Announcing “auto” 8.0.0
802.11 Savage
802.11 Savage

Posted on

Announcing “auto” 8.0.0

We are excited to announce the release of auto 8.0.0! This release brings a new command next, a new use for shipit, more powerful label configuration, and more.

If you are unfamiliar, auto is a CLI tool which helps you version your code and automate any part of your release pipeline. auto's main use is for automating your versioning with semantic versioning and GitHub pull request labels. It handles determining the next version, creating changelogs, publishing to package managers, publishing GitHub Releases, and so much more through plugins.

The following is a high level view of the workflow that auto shipit enables:

Alt Text

If you aren't already using auto you can either install it through npm:

npm install auto

Or if you are publishing to something other than npm:

# On OSX
brew tap intuit/auto https://github.com/intuit/auto
brew install auto

# Or other OSs
# Download a platform specific version of auto
curl -vkL -o - https://github.com/intuit/auto/releases/download/v8.0.0/auto-linux.gz | gunzip > ~/auto
# Make auto executable
chmod a+x ~/auto

next Command

This new command will make a preview release of your code. This entails:

  1. Creating a prerelease on package management platform (supported by npm and git-tag plugins)
  2. Creating a tag and "Pre Release" on GitHub releases page

The only prerelease branch auto comes configured with is next. You can configure as many branches as you want with the prereleaseBranches .autorc option. If your package manager plugin supports release tags, such as the npm plugin, auto will publish the prerelease branch to a tag of the same name. Calling auto next from a one of these branches will publish a prerelease, otherwise it will publish to your default prerelease branch/tag.

Example Usage

Given the following configuration:

{
  "prereleaseBranches": ["beta"]
}

Run auto next from beta branch => Publish prerelease to beta tag.
Run auto next from feature branch => Publish prerelease to beta tag.

Prerelease Branches with shipit

The shipit command will now also publish a prerelease when ran from a prerelease branch. You can use this in a few different ways:

  1. Two release branches: master and next
  2. Without next Branch (--only-graduate-with-release-label)
  3. Multiple next Branches (ex: alpha, beta, rc)
  4. Feature Pre-releases

Read more here.

Label Configuration

Label configuration just got a whole lot simpler 🎉.

  1. Labels can now only be supplied as an array of label objects.
{
  "labels": [
    { "releaseType": "major", "name": "Version: Major" },
    { "releaseType": "minor", "name": "Version: Minor" },
    { "releaseType": "patch", "name": "Version: Patch" }
  ]
}
  1. Instead of using skipReleaseLabels just set the label's type to skip
   {
     "labels": [{ "releaseType": "skip", "name": "NO!" }]
   }
  1. Overwrite default labels using overwrite
   {
     "labels": [
       { "releaseType": "major", "name": "Version: Major", "overwrite": true }
     ]
   }
  1. Add none releaseType. This will act as a skip-release unless paired with a SEMVER label
   {
     "labels": [{ "releaseType": "none", "name": "documentation" }]
   }
  1. Changed title to changelogTitle.
   {
     "labels": [{ "changelogTitle": "New Docs Yo!", "name": "documentation" }]
   }

Upload Assets - Globs

You might want to upload multiple files or you might not know the file-name (ex: a vscode extension w/ a version number in the name), but you know the pattern of the filenames that you want to upload. So now you can use globs!

{
  "plugins": [["upload-assets", ["./path/**/to/*.file"]]]
}

💥 Other Notable Breaking Changes

Deprecate --very-verbose, -w Flag

Using -w for very verbose logs was a very odd choice on my part (two vs next to each other look like a w 😓). Instead you can now just add another -v and get the very verbose logs!

# old
auto shipit -w

# new
auto shipit -vv
# or
auto shipit --verbose --verbose

We hope you enjoy the new ways you can release your code!

– Andrew Lisowski and the auto Team

View the full release notes.

Top comments (0)