Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

feat: add support for GitHub automatic release notes generation #442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lauravuo
Copy link

Update Octokit to latest and add new parameter for GitHub automatic release notes generation.

New input param auto_generate_release_notes. If true, GitHub will automatically generate release notes.

Closes #312

Update Octokit to latest and add new parameter for GitHub automatic release notes generation.
@natarajanc-prodigygame
Copy link

This is awesome - thanks for doing this - can some one review this and merge

@oliversalzburg
Copy link

Do these replace the changelog that is already generated by the action? Couldn't quite make sense of the diff and was confused, because I already get release notes from the action.

@lauravuo
Copy link
Author

@oliversalzburg Yes, instead of using the release notes generated by the action, GitHub generates release notes automatically based on release.yml-configuration file. So setting auto_generate_release_notes as true is for peeps who wants to use this action only for release creation, but let GitHub generate the notes. Default value is false so one needs explicitly to define this param to take the functionality in use i.e. default functionality remains unchanged.

@oliversalzburg
Copy link

Cool. Thanks for explaining. Looking forward to this :)

@natarajanc-prodigygame
Copy link

@oliversalzburg

Do these replace the changelog that is already generated by the action?

just wondering how the changelog is generated for you by the action automatically? - i have to actually click the github generate release notes button manually after the action creates the release

im using something like this for the action

         repo_token: ${{ secrets.OPS_GHA_USER_TOKEN }}
          draft: false
          title: "release - ${{ steps.date.outputs.date }}"
          automatic_release_tag: ${{ steps.get-latest-tag.outputs.tag }}
          prerelease: false

@oliversalzburg
Copy link

@natarajanc-prodigygame
Copy link

@oliversalzburg thanks for that example - noticed you are using prerelease: true in the action config for your nightly build - what i am doing is trying to do generate a release like you have here https://github.com/oliversalzburg/cbc-kitten-scientists/releases/tag/v2.0.0-alpha.1 but in my case with prerelease: false i dont get the release notes unless i click the generate release notes button (after the release is published)

@oliversalzburg
Copy link

@natarajanc-prodigygame That's interesting. The alpha.1 release was built by just creating the git tag locally and then pushing that tag. The action is defined in https://github.com/oliversalzburg/cbc-kitten-scientists/blob/master/.github/workflows/userscript-tagged-release.yml and this one sets prerelease: false

@natarajanc-prodigygame
Copy link

hi @lauravuo is there a way to use this PR as part of my git actions till this is merged to master?

will something like this work?

      - uses: marvinpinto/action-automatic-releases@1c2d1ec3b7a88bec29f73ee6af5ce32f74eec4ad
        with:
          repo_token: ${{ secrets.TOKEN }}
          draft: false
          automatic_release_tag: xxx
          prerelease: false
          auto_generate_release_notes: true

@lauravuo
Copy link
Author

lauravuo commented Jun 5, 2022

@natarajanc-prodigygame I am not sure how to use if there is a way to use this change through the main project, I created a fork and updated the code there, see here how I used my fork: https://github.com/lauravuo/licence-scan-go/blob/a07e81003192f4f61d57e4b57da773a91658f34c/.github/workflows/release.yml#L14

@@ -306,10 +316,11 @@ export const main = async (): Promise<void> => {
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: releaseTag,
name: args.releaseTitle ? args.releaseTitle : releaseTag,
...(args.autoGenerateReleaseNotes ? {} : {name: args.releaseTitle ? args.releaseTitle : releaseTag}),
Copy link

@natarajanc-prodigygame natarajanc-prodigygame Jun 7, 2022

Choose a reason for hiding this comment

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

@lauravuo i tried using this via your forked action.yml https://github.com/lauravuo/action-automatic-releases/blob/test-changes/action.yml for some reason the custom title is not getting reflected when i generate a release (it uses the automatic_release_tag as the release title)

im using the action this way

      - uses: "lauravuo/action-automatic-releases@test-changes"
        with:
          repo_token: ${{ secrets.OPS_GHA_USER_TOKEN }}
          draft: false
          title: "Dippr release - ${{ steps.date.outputs.date }}"
          automatic_release_tag: ${{ steps.get-latest-tag.outputs.tag }}
          prerelease: false
          auto_generate_release_notes: true

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jun 28, 2023

can you rebase so we can merge?

@crowbarmaster
Copy link

Hello @lauravuo! Since this request was from a while back and the original developer seems to have lost interest, I have updated this action's dependencies and have fulfilled yours and any other requests that have been opened. Simply change the target action to crowbarmaster/GH-Automatic-Releases@latest. This action is still fully backwards compatible with the original.

Repo: https://github.com/crowbarmaster/GHactions
Marketplace listing: https://github.com/marketplace/actions/cbgh-automatic-releases

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[github automatic releases] use github's "Auto-generate release notes" feature
5 participants