Skip to content

[Bug]: 404 - discussion category mismatch on >v.2.5.2Β #786

Closed

Description

@ramonbroox

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.0

Runner operating system

windows-latest

Release target repository

No response

Reproduction repo, gist, or artifact

No response

Workflow snippet

- name: Release Mirror
      uses: softprops/action-gh-release@v2
      if: startsWith(github.ref, 'refs/tags/v')
      env:
        GITHUB_TOKEN: ${{ secrets.BINARIES_REPO_TOKEN }}
      with:
        repository: ******/ReleaseMirror
        name: Product ${{ steps.ghd.outputs.describe }}
        tag_name: Product-${{ steps.ghd.outputs.describe }}
        prerelease: ${{ env.IS_PRERELEASE == '1' }}
        body_path: changes.txt
        append_body: true
        files: |
          Product*.exe

Expected behavior

Up to v2.5.0 releases were created with no issue.

Actual behavior

πŸ‘©β€πŸ­ Creating new GitHub release for tag ****
⚠️ GitHub release failed with status: 404
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#create-a-release","status":"404"}
Skip retry - discussion category mismatch
πŸ‘©β€πŸ­ Creating new GitHub release for tag ****
⚠️ GitHub release failed with status: 404
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#create-a-release","status":"404"}
Skip retry - discussion category mismatch
Error: Not Found - https://docs.github.com/rest/releases/releases#create-a-release

Steps to reproduce

Normal use (see snippet).
Target repo has no discussions enabled.

Relevant logs

Run softprops/action-gh-release@v2
  with:
    repository: *****
    name: ***
    tag_name: ***
    prerelease: true
    body_path: changes.txt
    append_body: true
    files: ****.deb
           ****.exe
    overwrite_files: true
    token: ***
  env:
    pythonLocation: C:\hostedtoolcache\windows\Python\3.12.10\x64
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.12.10\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.12.10\x64
    Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.12.10\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.12.10\x64
    UV_TOOL_BIN_DIR: D:\a\_temp\uv-tool-bin-dir
    UV_TOOL_DIR: D:\a\_temp\uv-tool-dir
    UV_CACHE_DIR: D:\a\_temp\setup-uv-cache
    GITHUB_TOKEN: ***
πŸ‘©β€πŸ­ Creating new GitHub release for tag ****
⚠️ GitHub release failed with status: 404
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#create-a-release","status":"404"}
Skip retry - discussion category mismatch
πŸ‘©β€πŸ­ Creating new GitHub release for tag ****
⚠️ GitHub release failed with status: 404
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/releases/releases#create-a-release","status":"404"}
Skip retry - discussion category mismatch
Error: Not Found - https://docs.github.com/rest/releases/releases#create-a-release

Additional context

Used to mirror a local release to a secondary report, stopped working on jumping from v2.5.0 to v2.6.2.
Maybe caused by 569deb8? Related to #764
Target repo has no discussions enabled. Maybe just including it in the json makes (as null?) github REST api check for it?

Activity

  1. mbparker commented on May 31, 2026

    @mbparker

    I get the same exact error now on a repo that I transferred from my personal account to a private org that I own. The release process worked fine with v3 until I transferred repo ownership. It still works as expected with my other repos.

    Workflow snippet

          - name: Upload Release Assets
            uses: softprops/action-gh-release@v3
            with:
              token: ${{ secrets.GH_TOKEN }}
              files: |
                artifacts/windows/**
                artifacts/macos/**
                artifacts/linux/**

    UPDATE:

    My issue was self-inflicted. I needed to change out the access token I was using to use the one from the private org - the new repo owner. The original PAT was out of scope.

    So for me, this has been resolved.

  2. chenrui333 commented on Jul 13, 2026

    @chenrui333
    Collaborator

    I ran a controlled cross-repository matrix for this report using a dedicated private target with Discussions disabled.

    The valid-token/no-category scenario succeeds on v2.5.0, v2.6.0, v2.6.2, v3.0.0, floating v3, current master, and the proposed diagnostics branch. It also succeeds on both Windows and Ubuntu. An empty workflow input is parsed as undefined and omitted from the actual Octokit JSON request, so I could not reproduce a request-construction regression at the v2.5 to v2.6 boundary.

    The distinguishing evidence is that GitHub returns 404 for both of these cases:

    • an explicit invalid discussion category
    • a token that cannot see the private remote target

    Before the patch, every create-release 404 was logged as a discussion-category mismatch. Current draft discovery can also encounter the access-obscuring 404 while listing releases, before creation starts.

    PR #817 updates those paths to point to the repository name, token access, fine-grained PAT repository selection, and Contents: write; it mentions Discussions only when a category was actually supplied. It also prevents a create-release 404 from being reinterpreted as a failed tag lookup and triggering a redundant create attempt.

    Key live evidence:

    Because valid release creation already works in the controlled scenario, #817 uses Related to #786 rather than closing this as a functional regression. If the original setup still fails after the next action release, please retest with a PAT that explicitly includes the target repository and Contents: write, then open a fresh report with the target visibility and PAT type (without sharing the token).

  3. chenrui333 commented on Jul 13, 2026

    @chenrui333
    Collaborator

    The improved release-creation 404 diagnostics shipped in v3.0.2.

    The post-release harness confirmed that v3.0.2 can publish to a private remote repository with Discussions disabled when the PAT includes the target repository and Contents: write: https://github.com/ruitest2/action-gh-release-test/actions/runs/29258319738

    If this still occurs with softprops/action-gh-release@v3.0.2 or @v3, please confirm the PAT type, target-repository selection, and Contents permission without sharing the token.

  4. chenrui333 commented on Jul 13, 2026

    @chenrui333
    Collaborator

    feel free to raise another issue if still happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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