Coder Social home page Coder Social logo

belked / release-with-changelog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fregante/release-with-changelog

0.0 0.0 0.0 893 KB

Creates reasonable enough GitHub releases for pushed tags, with the commit log as release body

License: MIT License

JavaScript 100.00%

release-with-changelog's Introduction

release-with-changelog

Creates reasonable enough GitHub releases for pushed tags, with the commit log as release body.

The action also has customizable release body, that support markdown, and template fields. See template option to see how that works.

By no means is this an action with extensive configurable options except for the ones already provided. But I would love to add some more in the future.

Usage

jobs:
  Release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 50
    - uses: fregante/release-with-changelog@v3
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

Or you can customize it further:

    - uses: fregante/release-with-changelog@v3
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        exclude: '^Meta'
        commit-template: '- {title} ← {hash}'
        template: |
          ### Changelog

          {commits}

          {range}

Clone depth

The action expects you to do a deep clone of the repository using actions/checkout@v2 in order to get historical commits. You can use fetch-depth: 0 for actions/checkout action to clone entire repository or have a reasonable number like 100 to fetch the last 100 commits.

Inputs

token

Required: Personal access token used to create releases.

title

Default: {tag}

Title for the release being create. Available replacements:

  • {tag} The tag for which the changelog is being generated.

template

Default:

{commits}

{range}

Markdown template to be included in release notes. Available replacements:

  • {commits} List of commits for this release, see commit-template below for format of each entry.
  • {range} A link to diff on GitHub between the last and current release.

commit-template

Default: '- {hash} {title}'

Markdown template for each commit entry in release notes. Available replacements:

  • {title} A single line title of the commit.
  • {hash} Abbreviated commit hash, gets linkified automatically in release notes.
  • {url} Plain link to commit on GitHub.
  • {date} Date of commit, could be specified in date-format.

exclude

Default: ''
Example: '^Meta:'
Example: true

Regex to exclude commits based on their title (don't include the initial and final /).

Setting this to true will enable the default preset, which may change over time, but is currently: /^meta|^document|^lint|^refactor|readme|dependencies|^v?\d+\.\d+\.\d+/i

tag

Default: the tag that triggered the workflow run or the latest tag available

Specific tag for which to generate changelog.

date-format

Default: short
Example: local
Example: %d.%m.%Y

Format of {date} replacement as used by git log --date, as either a keyword or a strftime string. More info can be found in StackOverflow answer.

sort

Default: desc
Example: asc

Set to asc if you want to have changelog printed in reverse order.

draft

Default: false
Example: true

Set to true if you want to have draft release.

prerelease

Default: false
Example: true

Set to true if you want to have prerelease instead release.

skip-on-empty

Default: false
Example: true

Set to true if you want to skip creating the release when all commits are excluded.

Outputs

skipped

Will be set to true if skip-on-empty is enabled and a release was not created, false otherwise.

Release notes for previous tags/releases

If you already have tags/releases without release notes, delete the empty releases (not the tags) and use vercel/release to create the release notes for those tags:

# Unsaved changes might be lost. Push your changes to GitHub before running this
npm install release -g
for tag in $(git tag); do
	git checkout $tag && release;
done
git checkout origin/master

License

MIT

release-with-changelog's People

Contributors

belked avatar denvercoder1 avatar dependabot[bot] avatar fregante avatar notlmn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.