0
1
Fork 1
mirror of https://code.forgejo.org/actions/forgejo-release synced 2024-09-19 18:45:51 +02:00

Add download example

This commit is contained in:
Crown0815 2024-02-01 12:50:40 +00:00
parent ce36eb9e28
commit 38c8f4cd4d

View file

@ -27,7 +27,9 @@ Upload or download the assets of a release to a Forgejo instance.
## Example ## Example
``` ### Upload
```yaml
on: [tag] on: [tag]
jobs: jobs:
upload-release: upload-release:
@ -36,12 +38,32 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/forgejo-release@v1 - uses: actions/forgejo-release@v1
with: with:
direction: upload direction: upload
url: https://code.forgejo.org url: https://code.forgejo.org
release-dir: dist/release release-dir: dist/release
release-notes: "MY RELEASE NOTES" release-notes: "MY RELEASE NOTES"
``` ```
### Download
Example downloading the forgejo release v1.21.4-0 into the working directory:
```yaml
on: [tag]
jobs:
download-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/forgejo-release@v1
with:
direction: download
url: https://code.forgejo.org
repo: forgejo/forgejo
tag: v1.21.4-0
release-dir: ./ # by default, files are downloaded into dist/release
```
## Update the README ## Update the README
With https://github.com/npalm/action-docs `action-docs --update-readme` With https://github.com/npalm/action-docs `action-docs --update-readme`