GitHub Action for creating GitHub Releases based on changelog.
This action creates GitHub Releases based on changelog that specified by changelog
option.
Currently, changelog format and supported tag names have the following rule:
-
This action uses parse-changelog to parse changelog. Only the changelog format accepted by parse-changelog is supported.
Basically, Keep a Changelog and similar formats are supported, but we recommend checking if parse-changelog can parse your project's changelog as you expected.
If the
changelog
option is not specified, the changelog is ignored and only the release created. -
The supported tag format is
v?MAJOR.MINOR.PATCH(-PRERELEASE)?(+BUILD_METADATA)?
. (leading "v", pre-release version, and build metadata are optional.) This is based on Semantic Versioning
Name | Required | Description | Type | Default |
---|---|---|---|---|
changelog | false | Path to changelog (variables $tag , $version , $prefix , and any string) |
String | |
title | false | Format of title (variables $tag , $version , $prefix , and any string) |
String | $tag |
draft | false | Create a draft release (true or false ) |
Boolean | false |
branch | false | Reject releases from commits not contained in branches that match the specified pattern (regular expression) | String | |
prefix | false | An optional pattern that matches a prefix for the release tag, before the version number (see action.yml for more) | String |
Name | Description |
---|---|
computed-prefix | The computed prefix, including '-' and 'v'. |
version | The version number extracted from the tag. The tag name is a concatenation of computed-prefix and version . |
name: Release
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional) Path to changelog.
changelog: CHANGELOG.md
env:
# (Required) GitHub token for creating GitHub Releases.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Release
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional) Path to changelog.
changelog: CHANGELOG.md
# (Optional) Create a draft release.
# [default value: false]
draft: true
env:
# (Required) GitHub token for creating GitHub Releases.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You can customize the title of the release by title
option.
Example of the created release.
name: Release
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional)
changelog: CHANGELOG.md
# (Optional) Format of title.
# [default value: $tag]
# [possible values: variables $tag, $version, and any string]
title: $version
env:
# (Required) GitHub token for creating GitHub Releases.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
If the changelog
option is not specified, the changelog is ignored and only the release created.
Example of the created release.
name: Release
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
env:
# (Required) GitHub token for creating GitHub Releases.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You can reject releases from commits not contained in branches that match the specified pattern by using branch
option.
name: Release
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional) Path to changelog.
changelog: CHANGELOG.md
# (Optional) Reject releases from commits not contained in branches
# that match the specified pattern (regular expression)
branch: main
env:
# (Required) GitHub token for creating GitHub Releases.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- upload-rust-binary-action: GitHub Action for building and uploading Rust binary to GitHub Releases.
- parse-changelog: Simple changelog parser, written in Rust. Used in this action.
- install-action: GitHub Action for installing development tools.
- setup-cross-toolchain-action: GitHub Action for setup toolchains for cross compilation and cross testing for Rust.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.