Skip to main content

Gitea

Create releases and upload assets to Gitea

Anodizer can create releases and upload assets to Gitea repositories.

Minimal config

release:
  gitea:
    owner: myorg
    name: myrepo

Gitea-specific config

The release config is shared across all SCM providers. See the GitHub releases page for the full list of shared fields. The Gitea-specific fields are:

Gitea URLs (gitea_urls)

FieldTypeDefaultDescription
apistringauto-derivedGitea API base URL
downloadstringderived from apiGitea download base URL
skip_tls_verifyboolfalseSkip TLS certificate verification

Environment variables

VariableDescription
GITEA_TOKENGitea API token

Release modes

Control how release notes are handled when a release already exists:

ModeBehavior
keep-existingKeep existing release body unchanged
appendAppend new content after existing body
prependPrepend new content before existing body
replaceReplace existing body entirely

Behavior

  • Supports draft and prerelease flags (unlike GitLab)
  • Existing release detection uses paginated listing (up to 10 pages, 50 per page)
  • replace_existing_artifacts: lists attachments, finds by name, deletes, then re-uploads
  • Asset upload via multipart POST with the file as the attachment form field
  • URL segments are percent-encoded for special characters
  • 300-second HTTP timeout

Self-hosted Gitea

gitea_urls:
  api: "https://gitea.mycompany.com"

Full example

release:
  gitea:
    owner: myorg
    name: myrepo
  name_template: "{{ ProjectName }} {{ Version }}"
  draft: true
  prerelease: auto
  header:
    from_file: RELEASE_HEADER.md
  mode: replace
  replace_existing_artifacts: true

gitea_urls:
  api: "https://gitea.mycompany.com"