Forgejo
Fully supported — release PRs, changelog, tagging-on-merge, and brel init all work on Forgejo (including Codeberg and self-hosted instances). brel talks to Forgejo through its REST API.
Prerequisites
Section titled “Prerequisites”gitavailable wherever brel runs.- A Forgejo access token with repository write access. brel reads it from
BREL_FORGEJO_TOKEN, thenFORGEJO_TOKEN, thenGITHUB_TOKEN(Forgejo Actions exposes GitHub-compatible variable names, so the automatic workflow token works out of the box). - A Forgejo Actions runner with Docker available (the generated workflow uses
runs-on: dockerwith arust:latestcontainer).
-
Install brel and create a
brel.tomlat the repository root:provider = "forgejo"default_branch = "main"[release_pr.version_updates]"package.json" = ["version"] -
Generate the managed workflow:
Terminal window brel validatebrel init --yesThis writes the Forgejo Actions workflow (default name
release-pr.yml, marked# managed-by: brel). -
Commit and push to
main. Every push tomainnow runsbrel release-prand keeps a release PR up to date.
What the generated workflow does
Section titled “What the generated workflow does”- Triggers on pushes to your default branch and on
workflow_dispatch. - Runs in a
rust:latestcontainer, checking out with full history viahttps://code.forgejo.org/actions/checkout@v4. - Installs a pinned brel with
cargo install brel --version <version> --locked, plus the changelog runtime (git-cliff via cargo, or Node viasetup-nodefor changelogen). - Runs
brel changelogthenbrel release-prwithBREL_FORGEJO_TOKENset from the workflow token.
brel discovers the instance and repository from FORGEJO_SERVER_URL/FORGEJO_REPOSITORY (or their GITHUB_* aliases), which Forgejo Actions provides automatically.
Tagging on merge
Section titled “Tagging on merge”With [release_pr.tagging] enabled, the workflow gains a pull_request: closed trigger and a release-tag job that runs brel tag when a managed release PR merges. Event data comes from FORGEJO_EVENT_PATH (or GITHUB_EVENT_PATH).
Running locally
Section titled “Running locally”BREL_FORGEJO_TOKEN=... \FORGEJO_SERVER_URL=https://codeberg.org \FORGEJO_REPOSITORY=owner/repo \brel release-prSee Environment Variables for the full list.