feat: allow for draft releases

Closes #56.

Adds a `draft` input that, if true, skips the step of setting the draft
status to false.

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

View file

@ -26,6 +26,7 @@ Upload or download the assets of a release to a Forgejo instance.
| `verbose` | <p>Increase the verbosity level</p> | `false` | `false` |
| `override` | <p>Override an existing release by the same <code>{tag}</code></p> | `false` | `false` |
| `prerelease` | <p>Mark Release as Pre-Release</p> | `false` | `false` |
| `draft` | <p>Mark this release as a draft</p> | `false` | `false` |
| `release-notes-assistant` | <p>Generate release notes with Release Notes Assistant</p> | `false` | `false` |
| `hide-archive-link` | <p>Hide the archive links</p> | `false` | `false` |
<!-- action-docs-inputs source="action.yml" -->
@ -53,6 +54,27 @@ jobs:
release-notes: "MY RELEASE NOTES"
```
Upload a draft prerelease, with assets located in `artifacts`:
```yaml
jobs:
upload-release:
runs-on: docker
steps:
- uses: actions/checkout@v4
- 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: v2.1.0-rc1
release-dir: artifacts
release-notes: "CHANGEME"
draft: true
prerelease: true
```
### Download
Example downloading the forgejo release v1.21.4-0 into the working directory: