diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index f00722b..5ff6397 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -1,10 +1,22 @@ -on: [ pull_request, push ] +on: [pull_request, push] jobs: tests: runs-on: docker + container: + image: data.forgejo.org/oci/node:24-trixie + steps: - uses: actions/checkout@v6 + - name: lint action-docs + run: | + npx --yes action-docs -u + git diff --quiet || { + echo "[ERROR] Please apply the changes action-docs suggests:" + git diff --color=always + exit 1 + } + - name: Unit tests of the supporting script forgejo-release.sh run: | testdata/forgejo-release-test.sh test_system_tea_bin diff --git a/README.md b/README.md index 6afef80..e2ae420 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,13 @@ Upload or download the assets of a release to a Forgejo instance. | name | description | required | default | | --- | --- | --- | --- | -| `url` |

URL of the Forgejo instance

| `false` | `${{ env.GITHUB_SERVER_URL }}` | -| `repo` |

owner/project relative to the URL

| `false` | `${{ github.repository }}` | -| `tag` |

Tag of the release

| `false` | `${{ github.ref_name }}` | +| `url` |

URL of the Forgejo instance

| `false` | `${{ env.FORGEJO_SERVER_URL }}` | +| `repo` |

owner/project relative to the URL

| `false` | `${{ forge.repository }}` | +| `tag` |

Tag of the release

| `false` | `${{ forge.ref_name }}` | | `title` |

Title of the release (defaults to tag)

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

SHA of the release

| `false` | `${{ github.sha }}` | -| `token` |

Forgejo application token (must have `write:repository`)

| `false` | `${{ secrets.GITHUB_TOKEN }}` | -| `release-dir` |

Directory in whichs release assets are uploaded or downloaded

| `true` | `""` | +| `sha` |

SHA of the release

| `false` | `${{ forge.sha }}` | +| `token` |

Forgejo application token (must have write:repository)

| `false` | `${{ forge.token }}` | +| `release-dir` |

Directory in which release assets are uploaded or downloaded

| `false` | `dist/release` | | `release-notes` |

Release notes

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

Can either be download or upload

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

GPG Private Key to sign the release artifacts

| `false` | `""` | @@ -28,6 +28,7 @@ Upload or download the assets of a release to a Forgejo instance. | `prerelease` |

Mark Release as Pre-Release

| `false` | `false` | | `release-notes-assistant` |

Generate release notes with Release Notes Assistant

| `false` | `false` | | `hide-archive-link` |

Hide the archive links

| `false` | `false` | +| `skip-assets` |

Skip uploading release assets

| `false` | `false` | ## Examples @@ -83,5 +84,5 @@ Using [action-docs](https://github.com/npalm/action-docs): ```shell # Edit the action.yml file and run: -action-docs --update-readme +npx action-docs --update-readme ``` diff --git a/action.yml b/action.yml index 268d42b..adbcc1b 100644 --- a/action.yml +++ b/action.yml @@ -19,11 +19,11 @@ inputs: description: 'SHA of the release' default: '${{ forge.sha }}' token: - description: 'Forgejo application token' + description: 'Forgejo application token (must have `write:repository`)' default: '${{ forge.token }}' release-dir: description: 'Directory in which release assets are uploaded or downloaded' - default: '' + default: 'dist/release' release-notes: description: 'Release notes' direction: @@ -37,22 +37,22 @@ inputs: description: 'Number of times to retry if the release is not ready (default 1)' download-latest: description: 'Download the latest release' - default: false + default: 'false' verbose: description: 'Increase the verbosity level' - default: false + default: 'false' override: description: 'Override an existing release by the same `{tag}`' - default: false + default: 'false' prerelease: description: 'Mark Release as Pre-Release' - default: false + default: 'false' release-notes-assistant: description: 'Generate release notes with Release Notes Assistant' - default: false + default: 'false' hide-archive-link: description: 'Hide the archive links' - default: false + default: 'false' skip-assets: description: Skip uploading release assets default: 'false'