From 8ebade34589fe685e3983153183a2a47195ed73b Mon Sep 17 00:00:00 2001 From: natct Date: Tue, 29 Oct 2024 11:59:40 +0100 Subject: [PATCH 1/3] feat(doc): update `README.md` --- README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c52ba8..e020a8a 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,12 @@ Upload or download the assets of a release to a Forgejo instance. | `prerelease` |

Mark Release as Pre-Release

| `false` | `false` | -## Example +## Examples ### Upload +Upload the release located in `release-dir` to the release section of a repository (`url` and `repo`): + ```yaml on: [tag] jobs: @@ -39,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/forgejo-release@v1 + - uses: actions/forgejo-release@v2 with: direction: upload url: https://code.forgejo.org @@ -58,7 +60,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/forgejo-release@v1 + - uses: actions/forgejo-release@v2 with: direction: download url: https://code.forgejo.org @@ -67,6 +69,15 @@ jobs: release-dir: ./ # by default, files are downloaded into dist/release ``` -## Update the README +### Real world example -With https://github.com/npalm/action-docs `action-docs --update-readme` +This action is used to [publish](https://code.forgejo.org/forgejo/release-notes-assistant/src/branch/main/.forgejo/workflows/release.yml) the release notes assistant assets. + +## Update the `input` section of the README + +Using [action-docs](https://github.com/npalm/action-docs): + +```shell +# Edit the action.yml file and run: +action-docs --update-readme +``` From e613cff3d500a95c6c45838bb4ab259e1509059b Mon Sep 17 00:00:00 2001 From: natct Date: Tue, 29 Oct 2024 11:59:58 +0100 Subject: [PATCH 2/3] feat(doc): update `action.yml` --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 125dd93..db93c7c 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,7 @@ inputs: release-notes: description: 'Release notes' direction: - description: 'Can either be download or upload' + description: 'Can either be `download` or `upload`' required: true gpg-private-key: description: 'GPG Private Key to sign the release artifacts' @@ -38,7 +38,7 @@ inputs: description: 'Increase the verbosity level' default: 'false' override: - description: 'Override an existing release by the same {tag}' + description: 'Override an existing release by the same `{tag}`' default: 'false' prerelease: description: 'Mark Release as Pre-Release' From f3b5347abfa6483bfdc994b6bb6d7d1148aadb57 Mon Sep 17 00:00:00 2001 From: natct Date: Tue, 29 Oct 2024 12:03:05 +0100 Subject: [PATCH 3/3] feat(doc): update `inputs` --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e020a8a..e879520 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,18 @@ Upload or download the assets of a release to a Forgejo instance. | `url` |

URL of the Forgejo instance

| `false` | `""` | | `repo` |

owner/project relative to the URL

| `false` | `""` | | `tag` |

Tag of the release

| `false` | `""` | -| `title` |

Title of the release

| `false` | `""` | +| `title` |

Title of the release (defaults to tag)

| `false` | `""` | | `sha` |

SHA of the release

| `false` | `""` | | `token` |

Forgejo application token

| `true` | `""` | | `release-dir` |

Directory in whichs release assets are uploaded or downloaded

| `true` | `""` | | `release-notes` |

Release notes

| `false` | `""` | -| `direction` |

Can either be download or upload

| `true` | `""` | +| `direction` |

Can either be download or upload

| `true` | `""` | | `gpg-private-key` |

GPG Private Key to sign the release artifacts

| `false` | `""` | | `gpg-passphrase` |

Passphrase of the GPG Private Key

| `false` | `""` | | `download-retry` |

Number of times to retry if the release is not ready (default 1)

| `false` | `""` | | `download-latest` |

Download the latest release

| `false` | `false` | | `verbose` |

Increase the verbosity level

| `false` | `false` | -| `override` |

Override an existing release by the same {tag}

| `false` | `false` | +| `override` |

Override an existing release by the same {tag}

| `false` | `false` | | `prerelease` |

Mark Release as Pre-Release

| `false` | `false` |