release
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
Flag | Type | Description |
---|---|---|
--dry-run , -d | Boolean | Report what command will do but do not actually do anything |
--no-version-prefix | Boolean | Use the version as the tag without the 'v' prefix. WARNING: some plugins might need extra config to use this option (ex: npm) |
--name | String | Git name to commit with. Defaults to package definition for the platform |
--email | String | Git email to commit with. Defaults to package definition for the platform |
--from | String | Git revision (tag, commit sha, ...) to start release notes from. Defaults to latest tag. |
--to | String | Git revision (tag, commit sha, ...) to end release notes at. Defaults to HEAD. |
--use-version | String | Version number to publish as. Defaults to reading from the package definition for the platform. |
--base-branch | String | Branch to treat as the base branch |
--prerelease | Boolean | Publish 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 orrelease
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.