Skip to content

[Bug]: overwrite_files: true fails on Gitea when replacing an existing release asset #803

@sschoen

Description

@sschoen

Pre-flight checks

  • I searched existing issues and did not find a duplicate
  • I reproduced this with the latest released version or current master
  • I included a reproducible example or a sanitized/redacted reproduction path if the original repository is private

action-gh-release version

v2.6.2

Runner operating system

ubuntu-latest

Release target repository

No response

Reproduction repo, gist, or artifact

No response

Workflow snippet

- name: Create release
  uses: softprops/action-gh-release@v2
  with:
    tag_name: v2026.12
    name: SourceGit v2026.12
    files: sourcegit-v2026.12.flatpak
    fail_on_unmatched_files: true
    overwrite_files: true

Expected behavior

When running on Gitea, overwrite_files: true should replace an existing release asset with the same filename.

The expected behavior is:

  1. Find the existing release by tag.
  2. Delete the existing asset/attachment with the same name.
  3. Upload the new file.
  4. Complete successfully.

Actual behavior

The first run succeeds and creates the release with the asset.

A later run with the same tag/release and asset name finds the existing release, but fails while deleting the old asset:

Found release SourceGit v2026.12 (with id=66)
♻️ Deleting previously uploaded asset sourcegit-v2026.12.flatpak...
Error: 404 page not found%0A
Error: Process completed with exit code 1.

Steps to reproduce

  1. Run the workflow on Gitea Actions with softprops/action-gh-release@v2 and overwrite_files: true.
  2. Let it create a release and upload an asset, e.g. sourcegit-v2026.12.flatpak.
  3. Re-run the workflow with the same tag_name and the same asset filename.
  4. The action finds the existing release, tries to delete the previous asset, and fails with 404 page not found.

Relevant logs

Run Create release
with:
  fail_on_unmatched_files: true
  files: sourcegit-v2026.12.flatpak
  name: SourceGit v2026.12
  overwrite_files: true
  tag_name: v2026.12
Found release SourceGit v2026.12 (with id=66)
♻️ Deleting previously uploaded asset sourcegit-v2026.12.flatpak...
Error: 404 page not found%0A
Error: Process completed with exit code 1.

Additional context

Gitea appears to be compatible enough with the GitHub Releases API for:

  • creating a release
  • finding an existing release by tag
  • uploading a new release asset

However, replacing an existing asset fails when the action tries to delete the previously uploaded asset.

This might be because Gitea models release files as release attachments and exposes a slightly different delete endpoint/API than GitHub release assets.

For comparison, akkuman/gitea-release-action@v1 handles the same scenario successfully on Gitea by using Gitea's release attachment API and deleting an existing attachment with the same name before uploading the new one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions