Announcing “auto” 8.0.0
Tags: devops, github, opensource, git
Published: 2019-12-12 08:06:18

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](https://semver.org/) and [GitHub](https://github.com/) pull request labels. It handles determining the next version, creating changelogs, publishing to package managers, publishing [GitHub Releases](https://help.github.com/en/github/administering-a-repository/about-releases), and so much more through plugins.

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

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/dbgx6jmmmo5gsaud7va5.png)

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

```sh
npm install auto
```

Or if you are publishing to something other than `npm`:

```sh
# 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](https://intuit.github.io/auto/pages/autorc.html#prerelease-branches) `.autorc` option. If your package manager plugin supports release tags, such as the [npm](https://intuit.github.io/auto/plugins/npm/README.html) 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:

```json
{
  "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](https://intuit.github.io/auto/pages/generated/shipit.html#prereleases).

## Label Configuration

Label configuration just got a whole lot simpler 🎉.

1. Labels can now only be supplied as an array of label objects.

   ```json
{
  "labels": [
    { "releaseType": "major", "name": "Version: Major" },
    { "releaseType": "minor", "name": "Version: Minor" },
    { "releaseType": "patch", "name": "Version: Patch" }
  ]
}
   ```

2. Instead of using `skipReleaseLabels` just set the label's `type` to `skip`

   ```json
   {
     "labels": [{ "releaseType": "skip", "name": "NO!" }]
   }
   ```

3. Overwrite default labels using `overwrite`

   ```json
   {
     "labels": [
       { "releaseType": "major", "name": "Version: Major", "overwrite": true }
     ]
   }
   ```

4. Add `none` `releaseType`. This will act as a `skip-release` unless paired with a SEMVER label

   ```json
   {
     "labels": [{ "releaseType": "none", "name": "documentation" }]
   }
   ```

5. Changed `title` to `changelogTitle`.

   ```json
   {
     "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](https://github.com/mrmlnc/fast-glob#basic-syntax)!

```json
{
  "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 `v`s next to each other look like a `w` 😓). Instead you can now just add another `-v` and get the very verbose logs!

```sh
# 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](https://github.com/intuit/auto/releases/tag/v8.0.0).