changelog: release notes from the commit messages, in every format a release needs
The commits since the previous tag of the same kind become notes.md, notes.txt, a CHANGELOG.md of the last releases, an nfpm changelog for the deb and rpm, notes.json and 500-character store notes; with release: 'true' they also go onto the tag's release on the Releases tab, inside a marked block that leaves the rest of the text alone. The same file reads the history from Gitea's API, for the packages publisher. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
34af870f6a
commit
3ca302921f
3 files changed
+433
-4
No files matched your search
@@ -0,0 +1,61 @@
|
||||
name: Release notes
|
||||
description: What changed since the previous tag, from the commit messages, in every format a release needs; optionally on the Releases tab
|
||||
inputs:
|
||||
prefix:
|
||||
description: The tag prefix of this kind of release (v, app-v, server-v)
|
||||
default: v
|
||||
tag:
|
||||
description: The tag being released; by default the tag that started the run, or everything since the newest tag
|
||||
default: ''
|
||||
name:
|
||||
description: The product's name in headings; the repository's name by default
|
||||
default: ''
|
||||
strip:
|
||||
description: A regular expression removed from the start of each subject
|
||||
default: ''
|
||||
packager:
|
||||
description: Name <address> written into the deb and rpm changelogs
|
||||
default: Arasaka di Hvozdikov Yevheniy <packages@arasaka.software>
|
||||
history:
|
||||
description: How many releases CHANGELOG.md and the package changelog carry
|
||||
default: '20'
|
||||
output:
|
||||
description: The folder the notes are written to
|
||||
default: release-notes
|
||||
release:
|
||||
description: "'true' also creates or updates this tag's release on the Releases tab with the notes"
|
||||
default: 'false'
|
||||
token:
|
||||
description: A token that may write this repository's releases (only with release)
|
||||
default: ${{ github.token }}
|
||||
outputs:
|
||||
dir:
|
||||
description: The folder with notes.md, notes.txt, CHANGELOG.md, changelog.yml, notes.json and store/en-US.txt
|
||||
value: ${{ steps.notes.outputs.dir }}
|
||||
notes:
|
||||
description: The path of notes.md
|
||||
value: ${{ steps.notes.outputs.notes }}
|
||||
previous:
|
||||
description: The previous tag, empty for a first release
|
||||
value: ${{ steps.notes.outputs.previous }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: notes
|
||||
shell: bash
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ inputs.token }}
|
||||
NOTES_PREFIX: ${{ inputs.prefix }}
|
||||
NOTES_TAG: ${{ inputs.tag }}
|
||||
NOTES_NAME: ${{ inputs.name }}
|
||||
NOTES_STRIP: ${{ inputs.strip }}
|
||||
NOTES_PACKAGER: ${{ inputs.packager }}
|
||||
NOTES_HISTORY: ${{ inputs.history }}
|
||||
NOTES_OUTPUT: ${{ inputs.output }}
|
||||
NOTES_RELEASE: ${{ inputs.release }}
|
||||
run: |
|
||||
args=(--repo . --prefix "$NOTES_PREFIX" --name "$NOTES_NAME" --strip "$NOTES_STRIP" --packager "$NOTES_PACKAGER" \
|
||||
--history "$NOTES_HISTORY" --out "$NOTES_OUTPUT")
|
||||
[ -n "$NOTES_TAG" ] && args+=(--tag "$NOTES_TAG")
|
||||
[ "$NOTES_RELEASE" = "true" ] && args+=(--release)
|
||||
python3 "${{ github.action_path }}/changelog.py" "${args[@]}"
|
||||
Reference in new issue
Block a user