Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srz-zumix/changelog-template-action
Generate changelogs from templates with reference to git history, tags and merged pull requests
https://github.com/srz-zumix/changelog-template-action
actions github-actions
Last synced: about 2 months ago
JSON representation
Generate changelogs from templates with reference to git history, tags and merged pull requests
- Host: GitHub
- URL: https://github.com/srz-zumix/changelog-template-action
- Owner: srz-zumix
- License: mit
- Created: 2023-08-25T05:58:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-29T00:29:59.000Z (5 months ago)
- Last Synced: 2024-08-29T15:42:25.328Z (5 months ago)
- Topics: actions, github-actions
- Language: Shell
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# changelog-template-action
Generate changelogs from templates with reference to git history, tags and merged pull requests
## Usage
* template file (release-note-with-body.md.j2)
```markdown
[Compare {{ from_revision }} with {{ to_revision }}]({{ env('GITHUB_SERVER_URL') }}/{{ inputs.owner }}/{{ inputs.repo }}/compare/{{ from_revision }}...{{ to_revision }})## Changes
{% for pull_request in pull_requests %}
* [{{ pull_request. title }}]({{ pull_request.url }}) - {{ pull_request.author.login }} {{ pull_request.mergedAt }}
{%- if pull_request.body | length > 0 -%}
details
{{ pull_request.body | indent(4) }}
{%- endif %}
{%- endfor %}
```* workflow
```yaml
permissions:
contents: read
pull-requests: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: changelog
id: changelog
uses: srz-zumix/changelog-template-action@v2
with:
template_file: release-note-with-body.md.j2
output_file: changelog.md
from: "v1.1.0"
to: "v1.2.0"
```## Example
### Update Release Notes on published
```yaml
name: UpdateReleaseNotes
on:
release:
types:
- publishedpermissions:
contents: write
pull-requests: readenv:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}jobs:
update-release-notes:
runs-on: ubuntu-latest
steps:
- name: changelog
id: changelog
uses: srz-zumix/changelog-template-action@v2
with:
template_file: templates/release-note-with-body.md.j2
output_file: changelog.md
- name: update
run: |
gh release edit ${{ github.event.release.tag_name}} -F changelog.md
```