feat: release notes from file

Takes priority over `release-notes`. Most useful in cases where we need
to generate something from a script; for example, if you have like 80
different assets and autogenerate a table to make it easier for users to
select their platform/sums/etc

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-11-11 21:27:19 -05:00
parent e5e095057a
commit 05d41bd915
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
2 changed files with 35 additions and 0 deletions

View file

@ -18,6 +18,7 @@ Upload or download the assets of a release to a Forgejo instance.
| `token` | <p>Forgejo application token</p> | `false` | `${{ secrets.GITHUB_TOKEN }}` |
| `release-dir` | <p>Directory in whichs release assets are uploaded or downloaded</p> | `true` | `""` |
| `release-notes` | <p>Release notes</p> | `false` | `""` |
| `release-notes-file` | <p>Path to a file containing your release notes (takes priority over `release-notes`)</p> | `false` | `""` |
| `direction` | <p>Can either be <code>download</code> or <code>upload</code></p> | `true` | `""` |
| `gpg-private-key` | <p>GPG Private Key to sign the release artifacts</p> | `false` | `""` |
| `gpg-passphrase` | <p>Passphrase of the GPG Private Key</p> | `false` | `""` |
@ -53,6 +54,27 @@ jobs:
release-notes: "MY RELEASE NOTES"
```
Upload a release with custom release notes located in a file:
```yaml
jobs:
upload-release:
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: Generate Changelog
run: ./generate-changelog.sh > dist/changelog.md
- uses: actions/forgejo-release@v2.7.3
with:
direction: upload
url: https://my-forgejo-instance.net
repo: myuser/myrepo
token: ${{ secrets.WRITE_TOKEN_TO_MYREPO }}
tag: v13.0.2
release-dir: dist/release
release-notes-file: dist/changelog.md
```
### Download
Example downloading the forgejo release v1.21.4-0 into the working directory: