Skip to content

release

Create a GitHub release for a tag. Defaults to last tag in branch.

NOTE: The tag must already be pushed to GitHub. If it isn't GitHub will create a tag pointing to the "to" option value.

Options

FlagTypeDescription
--dry-run, -dBooleanReport what command will do but do not actually do anything
--no-version-prefixBooleanUse the version as the tag without the 'v' prefix. WARNING: some plugins might need extra config to use this option (ex: npm)
--nameStringGit name to commit with. Defaults to package definition for the platform
--emailStringGit email to commit with. Defaults to package definition for the platform
--fromStringGit revision (tag, commit sha, ...) to start release notes from. Defaults to latest tag.
--toStringGit revision (tag, commit sha, ...) to end release notes at. Defaults to HEAD.
--use-versionStringVersion number to publish as. Defaults to reading from the package definition for the platform.
--base-branchStringBranch to treat as the base branch
--prereleaseBooleanPublish a prerelease on GitHub.

Examples

auto release
auto release

This command can be used in isolation easily. This example will: tag the release version at 'to' and create a GitHub release changelog over the commits range

auto release --from v0.20.1 --to HEAD --use-version v0.21.0
auto release --from v0.20.1 --to HEAD --use-version v0.21.0

Configurable Options

You can configure some of the options for the release command in the .autorc.

  • prerelease

Example .autorc:

{
  "release": {
    "prerelease": true
  }
}
{
  "release": {
    "prerelease": true
  }
}

⚠️ Make sure you give the GH_TOKEN repo permission or release will fail!

Usage

{
  "scripts": {
    "postpublish": "auto release"
  }
}
{
  "scripts": {
    "postpublish": "auto release"
  }
}

Make sure the branch/tag you're releasing is on github before running auto release. You will need to push the tags to github first:

{
  "scripts": {
    "postpublish": "git push --follow-tags --set-upstream origin $branch && auto release"
  }
}
{
  "scripts": {
    "postpublish": "git push --follow-tags --set-upstream origin $branch && auto release"
  }
}

Github Release Details

The details / description published with the Github release will be identical to those generated by the auto changelog command. See information regarding the release note format here.