create-gh-release-action

April 5, 2026 ยท View on GitHub

release github actions

GitHub Action for creating GitHub Releases based on changelog.

Usage

This action creates GitHub Releases based on changelog that specified by changelog option.

Currently, changelog format and supported tag names have the following rule:

Inputs

NameRequiredDescriptionTypeDefault
tokenGitHub token for creating GitHub Releases (see action.yml for more)String${{ github.token }}
changelogPath to changelog (variables $tag, $version, $prefix, and any string)String
allow-missing-changelogCreate the release even if the changelog entry corresponding to the version is missing. The default value of the changelog will be an empty string.Booleanfalse
titleFormat of title (variables $tag, $version, $prefix, and any string)String$tag
draftCreate a draft release (true or false)Booleanfalse
branchReject releases from commits not contained in branches that match the specified pattern (regular expression)String
prefixAn optional pattern that matches a prefix for the release tag, before the version number (see action.yml for more)String
refFully-formed tag ref for this release (see action.yml for more)String

Outputs

NameDescription
computed-prefixThe computed prefix, including '-' and 'v'.
versionThe version number extracted from the tag. The tag name is a concatenation of computed-prefix and version.

Example workflow: Basic usage

name: Release

permissions:
  contents: read

on:
  push:
    tags:
      - v[0-9]+.*

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write # for taiki-e/create-gh-release-action
    steps:
      - uses: actions/checkout@v6
      - uses: taiki-e/create-gh-release-action@v1
        with:
          # (Optional) Path to changelog.
          changelog: CHANGELOG.md

Example workflow: Create a draft release

name: Release

permissions:
  contents: read

on:
  push:
    tags:
      - v[0-9]+.*

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write # for taiki-e/create-gh-release-action
    steps:
      - uses: actions/checkout@v6
      - 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

Example workflow: Custom title

You can customize the title of the release by title option.

Example of the created release.

name: Release

permissions:
  contents: read

on:
  push:
    tags:
      - v[0-9]+.*

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write # for taiki-e/create-gh-release-action
    steps:
      - uses: actions/checkout@v6
      - 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

Example workflow: No changelog

If the changelog option is not specified, the changelog is ignored and only the release created.

Example of the created release.

name: Release

permissions:
  contents: read

on:
  push:
    tags:
      - v[0-9]+.*

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write # for taiki-e/create-gh-release-action
    steps:
      - uses: actions/checkout@v6
      - uses: taiki-e/create-gh-release-action@v1

Example workflow: Reject releases from outside of main branch

You can reject releases from commits not contained in branches that match the specified pattern by using branch option.

name: Release

permissions:
  contents: read

on:
  push:
    tags:
      - v[0-9]+.*

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write # for taiki-e/create-gh-release-action
    steps:
      - uses: actions/checkout@v6
      - 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

Other examples

Supported events

The following two events are supported by default:

  • tags (on.push.tags)

    For example:

    on:
      push:
        tags:
          - v[0-9]+.*
    
  • GitHub release (on.release)

    For example:

    on:
      release:
        types: [created]
    

You can create a release from arbitrary event to arbitrary tag by specifying the ref input option.

For example, to create a release to the my_tag tag, specify ref input option as follows:

with:
  ref: refs/tags/my_tag

Security

The @v<major> tags are updated with each release. If you want to enhance workflow stability and security against supply chain attacks, consider using the @v<major>.<minor>.<patch> tag or their hash to pin the version and regularly updating with dependency cooldown. Since all releases are immutable, pinning the version in either way should have the same effect.

Compatibility

This action has been tested for GitHub-hosted runners (Ubuntu, macOS, Windows).

To use this action in self-hosted runners or in containers, at least the following tools are required:

Note that what this action installs for its setup (such as above tools) is considered an implementation detail if they are installed by this action's side, and there is no guarantee that they will be available in subsequent steps, because this action is not an action for installing those tools.

  • upload-rust-binary-action: GitHub Action for building and uploading Rust binary to GitHub Releases.
  • parse-changelog: Simple changelog parser, written in Rust. This action uses this tool for changelog parsing.
  • setup-cross-toolchain-action: GitHub Action for setup toolchains for cross compilation and cross testing for Rust.
  • install-action: GitHub Action for installing development tools (mainly from GitHub Releases).
  • cache-cargo-install-action: GitHub Action for cargo install with cache.
  • checkout-action: GitHub Action for checking out a repository. (Simplified actions/checkout alternative that does not depend on Node.js.)

License

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.