Skip to content

[Bug]: Creating prerelease from draft release fails #795

@BenCurran98

Description

@BenCurran98

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

v3.0.0

Runner operating system

ubuntu-latest

Release target repository

BenCurran98/ReleaseActionTest

Reproduction repo, gist, or artifact

https://github.com/BenCurran98/ReleaseActionTest

Workflow snippet

name: Pre Release
on:
  workflow_dispatch:

jobs:
  PreRelease:
    permissions: write-all
    runs-on: "ubuntu-latest"
    steps:
      - name: Get Tag
        id: tag
        uses: BenCurran98/actions-github-release@main
        env:
          token: ${{ secrets.GITHUB_TOKEN }}
          repository:  BenCurran98/ReleaseActionTest
          type: "draft"
      - name: Save Pre Release
        uses: softprops/action-gh-release@v3
        with:
          token: "${{ secrets.GITHUB_TOKEN }}"
          draft: ${{ null }}
          prerelease: true
          tag_name: "${{ steps.tag.outputs.release }}"
          name: "${{ steps.tag.outputs.release }}"

Expected behavior

Prereleases should be able to be successfully created from previously made draft releases

Actual behavior

Workflow errors complaining about a release already existing for the supplied tag name

Steps to reproduce

  1. Trigger the draft release workflow with a specified tag name to create a draft release for a new tag
  2. Trigger the prerelease workflow which will grab the latest tag created in the draft release workflow and attempt to create a prerelease for it

Relevant logs

Draft release output: https://github.com/BenCurran98/ReleaseActionTest/actions/runs/25531805164/job/74939494324
Prerelease output: https://github.com/BenCurran98/ReleaseActionTest/actions/runs/25531822453/job/74939545897

Additional context

I believe this is a similar issue to what's reported in #772 and possibly #379

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