Create a release
const url = 'https://gitea.com/api/v1/repos/example/example/releases';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"body":"example","draft":true,"name":"example","prerelease":true,"tag_message":"example","tag_name":"example","target_commitish":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.com/api/v1/repos/example/example/releases \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "draft": true, "name": "example", "prerelease": true, "tag_message": "example", "tag_name": "example", "target_commitish": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Request Body
Section titled “Request Body”CreateReleaseOption options when creating a release
object
The release notes or description
Whether to create the release as a draft
The display title of the release
Whether to mark the release as a prerelease
The message for the git tag
The target commitish for the release
Examplegenerated
{ "body": "example", "draft": true, "name": "example", "prerelease": true, "tag_message": "example", "tag_name": "example", "target_commitish": "example"}Responses
Section titled “Responses”Release
Release represents a repository release
object
The files attached to the release
Attachment a generic attachment
object
DownloadURL is the URL to download the attachment
DownloadCount is the number of times the attachment has been downloaded
ID is the unique identifier for the attachment
Name is the filename of the attachment
Size is the file size in bytes
UUID is the unique identifier for the attachment file
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
The release notes or description
Whether the release is a draft
The HTML URL to view the release
The unique identifier of the release
The display title of the release
Whether the release is a prerelease
The name of the git tag associated with the release
The URL to download the tarball archive
The target commitish for the release
The URL template for uploading release assets
The API URL of the release
The URL to download the zip archive
Example
{ "author": { "login_name": "empty", "visibility": "public" }}APINotFound is a not found empty response
APIError is error format response
Headers
Section titled “Headers”APIValidationError is error format response related to input validation