tea release create: Publish Gitea Releases in CI
tea release create publishes a release for a tag on a Gitea or Forgejo instance and can attach asset files.
For self-hosted Gitea/Forgejo release automation, tea release create turns a tag into a published release with notes and uploaded binaries, driven entirely by flags.
What it does
tea release create makes a release bound to a tag, with a title and notes, and uploads any --asset files. It uses the configured tea login for the target instance, so no credentials appear in the command.
Common usage
# publish a release with notes and a binary asset
tea release create --repo owner/repo \
--tag v1.2.0 --title "v1.2.0" --note "Automated release" \
--asset ./dist/app-linux
# list releases
tea release list --repo owner/repoOptions
| Flag | What it does |
|---|---|
| --repo owner/repo | Target repository |
| --tag <tag> | Tag the release is attached to |
| --title <t> | Release title |
| --note <text> | Release notes |
| --asset <file> | Upload an asset file (repeatable) |
| --draft / --prerelease | Mark as draft or prerelease |
| --login <name> | Which configured login to use |
In CI
Supply --tag, --title, and --note so nothing prompts, and repeat --asset per file. Make sure the tag exists (push it first) since tea does not create tags. Pin --login if multiple instances are configured.
Common errors in CI
"Error: Please specify a repo" means --repo was omitted. "404 Not Found" on --tag means the tag was not pushed. "409 Conflict" or "release already exists" means a release for that tag exists; use tea release edit. "401 Unauthorized" means the login token is invalid or lacks write access.
Using this in CI
CI checkouts are shallow and detached by default, which changes the answer this command gives you. Commands that read history, branch names, or tags need the checkout configured for it.
- uses: actions/checkout@v4
with:
fetch-depth: 0 # history, tags, and git describe all need this
- run: |
git rev-parse --is-shallow-repository # expect false
git rev-parse --abbrev-ref HEAD # prints HEAD when detached