Skip to content

Latest commit

 

History

History
145 lines (109 loc) · 4.71 KB

README.md

File metadata and controls

145 lines (109 loc) · 4.71 KB

create-gh-release-action

build status

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

Name Required Description Type Default
changelog false Path to changelog String
title false Format of title (variables $tag, $version, and any string) String $tag

Example workflow: Basic usage

name: Release

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

jobs:
  create-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - 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 }}

Example workflow: Custom title

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@v2
      - 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: ${{ secrets.GITHUB_TOKEN }}

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

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

jobs:
  create-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: taiki-e/create-gh-release-action@v1
        env:
          # (required)
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Other examples

Related Projects

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.