Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to overwrite an existing draft release #413

Open
mitchelbaker-cisa opened this issue Feb 27, 2024 · 0 comments
Open

Unable to overwrite an existing draft release #413

mitchelbaker-cisa opened this issue Feb 27, 2024 · 0 comments

Comments

@mitchelbaker-cisa
Copy link

mitchelbaker-cisa commented Feb 27, 2024

I've been building a workflow to automate our project's release process. We create release branches then merge to main, so the objective was to create a draft release when a release PR is created. If new features are merged into the release branch, then this requires the existing draft release to be updated. However, after tinkering around and looking at other issues this functionality is not possible.

There's already proposed PRs with a fix along and a few issues requesting this.

PRs:

Issues:

As noted in the README,
💡 When the release info keys (such as name, body, draft, prerelease, etc.) are not explicitly set and there is already an existing release for the tag, the release will retain its original info.

I have each of these keys so the existing release should be updated here. Another action is being used to generate the changelog but it functions as expected, if anything action-gh-release should recognize that the body has new information and update accordingly.

on:
    workflow_dispatch:
    pull_request:
      types: 
        - opened
        - synchronize
      branches:
        - 'release-*'
  
jobs:

  ...

  build-release:
    if: startsWith(github.head_ref, 'release')
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      ...
        
      - name: Create Draft Release 
        uses: softprops/action-gh-release@v0.1.15
        with:
          name: "v${{ env.version }}"
          tag_name: "v${{ env.version }}"
          body: |
            ## [${{ env.version }}] - Timberrrrr! - ${{ env.date }} 
            ${{ steps.release.outputs.changelog }}
          files: v${{ env.version }}.zip
          draft: true
          prerelease: false
          discussion_category_name: "Announcements"
          generate_release_notes: false
          fail_on_unmatched_files: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant