8000 GitHub - RockerFlower/changelog-generator: GitHub Action to generate changelogs, release notes, whatever
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RockerFlower/changelog-generator

 
 

Repository files navigation

Get a changelog between two references

This Action returns a markdown formatted changelog between two git references. There are other projects that use milestones, labeled PRs, etc. Those are just to much work for simple projects.

I just wanted a simple way to populate the body of a GitHub Release.

Example Release Notes

Inputs

mytoken

A GITHUB_TOKEN with the ability to pull from the repo in question. This is required.

Why do we need myToken? Read more here: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token#about-the-github_token-secret

head-ref

The name of the head reference. Default ${{github.sha}}.

base-ref

The name of the second branch. Defaults to the tag_name of the latest release.

Outputs

changelog

Markdown formatted changelog.

Example usage

There are two blocks you will need. First you will need to generate the changelog itself. To get the changelog between the SHA of the commit that triggered the action and the tag of the latest release:

- name: Generate changelog
  id: changelog
  uses: metcalfc/changelog-generator@v0.4.0
  with:
    myToken: ${{ secrets.GITHUB_TOKEN }}

Or if you have two specific references you want:

- name: Generate changelog
  id: changelog
  uses: metcalfc/changelog-generator@v0.4.0
  with:
   
662D
 myToken: ${{ secrets.GITHUB_TOKEN }}
    head-ref: 'v0.0.2'
    base-ref: 'v0.0.1'

Then you can to use the resulting changelog.

- name: Get the changelog
  run: echo "${{ steps.changelog.outputs.changelog }}"

Example use case

Generating the release notes for a GitHub Release.

Acknowledgements

I took the basic framework for this action from: jessicalostinspace/commit-difference-action. Thanks @jessicalostinspace.

About

GitHub Action to generate changelogs, release notes, whatever

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 80.6%
  • Shell 19.4%
0