NAME

WWW::Gitea::API::Releases - Gitea repository releases API

VERSION

version 0.003

SYNOPSIS

my $releases = $gitea->releases->list('getty', 'p5-www-gitea');

my $rel = $gitea->releases->create('getty', 'p5-www-gitea',
    tag_name => 'v1.0.0', name => 'First release', body => 'Changelog',
);

my $same = $gitea->releases->get_by_tag('getty', 'p5-www-gitea', 'v1.0.0');

DESCRIPTION

Controller for the Gitea repository releases API. Reached via $gitea->releases. Releases are addressed by their numeric id, or by tag via "get_by_tag".

client

The parent WWW::Gitea client providing HTTP transport.

openapi_operations

Pre-computed operation table (operationId{method, path}).

list

my $releases = $gitea->releases->list('getty', 'p5-www-gitea');

Lists releases. Accepts the Gitea query parameters (draft, pre-release, page, limit). Returns an ArrayRef of WWW::Gitea::Release.

create

my $rel = $gitea->releases->create('getty', 'p5-www-gitea',
    tag_name         => 'v1.0.0',
    name             => 'First release',
    body             => 'Changelog ...',
    target_commitish => 'main',
    draft            => \0,
    prerelease       => \0,
);

Creates a release. tag_name is required; other arguments are passed through as the JSON body. Returns a WWW::Gitea::Release.

get

my $rel = $gitea->releases->get('getty', 'p5-www-gitea', 5);

Fetches a release by numeric id. Returns a WWW::Gitea::Release.

get_by_tag

my $rel = $gitea->releases->get_by_tag('getty', 'p5-www-gitea', 'v1.0.0');

Fetches a release by its tag name. Returns a WWW::Gitea::Release.

edit

$gitea->releases->edit('getty', 'p5-www-gitea', 5, draft => \0);

Edits a release. Arguments are passed through as the JSON body. Returns the updated WWW::Gitea::Release.

delete

$gitea->releases->delete('getty', 'p5-www-gitea', 5);

Deletes a release by numeric id. Returns a true value on success.

assets

my $assets = $gitea->releases->assets('getty', 'p5-www-gitea', 5);

Lists the assets attached to a release. Accepts the Gitea query parameters (page, limit). Returns an ArrayRef of WWW::Gitea::Attachment.

create_asset

my $asset = $gitea->releases->create_asset('getty', 'p5-www-gitea', 5,
    file => '/path/to/dist.tar.gz', name => 'dist.tar.gz');

my $asset = $gitea->releases->create_asset('getty', 'p5-www-gitea', 5,
    content => $bytes, name => 'notes.txt');

Uploads a release asset via multipart/form-data. Pass either file (a path on disk) or content (raw bytes). name sets the asset's display name (sent as the name query parameter); filename overrides the multipart part filename (defaulting to name for in-memory content). Returns a WWW::Gitea::Attachment.

get_asset

my $asset = $gitea->releases->get_asset('getty', 'p5-www-gitea', 5, 12);

Fetches a single release asset by its numeric attachment id. Returns a WWW::Gitea::Attachment.

edit_asset

$gitea->releases->edit_asset('getty', 'p5-www-gitea', 5, 12,
    name => 'renamed.tar.gz');

Edits a release asset (only name is editable). Arguments are passed through as the JSON body. Returns the updated WWW::Gitea::Attachment.

delete_asset

$gitea->releases->delete_asset('getty', 'p5-www-gitea', 5, 12);

Deletes a release asset by its numeric attachment id. Returns a true value on success.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://codeberg.org/getty/p5-www-gitea/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.