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

Support auto generating release notes #179

Merged
merged 1 commit into from
Nov 7, 2021
Merged

Support auto generating release notes #179

merged 1 commit into from
Nov 7, 2021

Conversation

xt0rted
Copy link
Contributor

@xt0rted xt0rted commented Oct 31, 2021

I'm not sure if anything else is needed to support this setting, but the change looks to match prior PRs. I used trailing commas in this update but I can remove those if you don't want them.

API Docs: https://docs.github.com/en/rest/reference/repos#create-a-release (generate_release_notes)

Closes #167
Closes #173
Closes #176

@seandstewart
Copy link

👍 to this - I'm looking to automate a bit more of my release workflows and this would be an excellent addition.

Copy link
Owner

@softprops softprops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Were you able to run this branch in a workflow to verify it works?

@xt0rted
Copy link
Contributor Author

xt0rted commented Nov 3, 2021

I didn't verify the change but I can later today.

@xt0rted
Copy link
Contributor Author

xt0rted commented Nov 3, 2021

Just did a couple releases in a test repo and the change looks to work. This is the workflow used:

on:
  push:
    tags:
      - "v*.*.*"

permissions:
  contents: write

jobs:
  release:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/[email protected]

      - uses: xt0rted/action-gh-release@testing
        with:
          generate_release_notes: true

The release created:

image

I removed the trailing commas, not sure how I missed the prettier setup for that, and added the setting to the readme.

@bennycode
Copy link

@xt0rted, I also tried your action-gh-release@testing and it worked like a charm. ✨ Result: https://github.com/bennycode/trading-signals/releases/tag/v2.4.1 👌

@softprops softprops merged commit 0465cda into softprops:master Nov 7, 2021
@xt0rted xt0rted deleted the generate-release-notes branch November 7, 2021 22:07
@bennycode
Copy link

@softprops thanks for merging this. Can you create a new tag & release version of your action so I can pin that in my GitHub workflow?

@bennycode
Copy link

@softprops & @xt0rted is something missing from the merged PR? I added this to my GitHub workflow:

      - name: Release
        uses: softprops/action-gh-release@0465cdad11d833cabb6414f885edd2ccdfda4b96
        if: startsWith(github.ref, 'refs/tags/')
        with:
          generate_release_notes: true

Unfortunately, it created a release with empty release notes: https://github.com/bennycode/trading-signals/releases/tag/v2.5.0

With xt0rted/action-gh-release@testing it was working (see here) but I can't use this action anymore because it got deleted.

@softprops
Copy link
Owner

I'll publish this weekend

@softprops
Copy link
Owner

ok. should be set here

@suntong suntong mentioned this pull request Dec 9, 2021
@mikeage
Copy link

mikeage commented Dec 6, 2022

This is a bit old, but an excellent contribution. Any chance of adding an option to set the previous release? Currently, it generates to the last release created, which is a sensible default, but I'd like to differentiate between two cases:

  1. Create a pre-release -- in this case, the changelog should be based on the last release of any type
  2. Create a regular release -- in this case, the change should be based on the difference from the last full release (i.e., last release that's not marked as pre-release).

I'm currently creating the body for the changelog manually, but I'd like to move to letting the action trigger github's automatic generation; this is the only thing missing for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants