From 38c8f4cd4d444673022368b9bfc29bc2622fb7bf Mon Sep 17 00:00:00 2001 From: Crown0815 Date: Thu, 1 Feb 2024 12:50:40 +0000 Subject: [PATCH] Add download example --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd9e7c5..d6645ee 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,9 @@ Upload or download the assets of a release to a Forgejo instance. ## Example -``` +### Upload + +```yaml on: [tag] jobs: upload-release: @@ -36,12 +38,32 @@ jobs: - uses: actions/checkout@v3 - uses: actions/forgejo-release@v1 with: - direction: upload - url: https://code.forgejo.org + direction: upload + url: https://code.forgejo.org release-dir: dist/release 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 With https://github.com/npalm/action-docs `action-docs --update-readme`