diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1bf69cc..7a72f0b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -342,7 +342,10 @@ jobs: my @cmd = (q{curl}, q{-sS}, q{-o}, q{/dev/null}, q{-w}, q{%{http_code}}, q{-H}, qq{Authorization: token $ENV{GITEA_TOKEN}}, q{-H}, q{Content-Type: application/octet-stream}, - q{-X}, q{POST}, q{--data-binary}, qq{@$path}, + # The @ must not sit inside a qq{} string: there it starts an + # array interpolation and the upload body collapses to empty, + # which Gitea stores as a 201-created zero-byte attachment. + q{-X}, q{POST}, q{--data-binary}, q{@} . $path, qq{$ENV{GITEA_SERVER_URL}/api/v1/repos/$ENV{GITEA_REPOSITORY}/releases/$id/assets?name=$name}); open(my $curl, q{-|}, @cmd) or die qq{curl: $!}; my $code = <$curl>;