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

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

Open
lauravuo wants to merge 1 commit into
marvinpinto:masterfrom
lauravuo:add-support-for-notes-autogeneration
Open

feat: add support for GitHub automatic release notes generation#442
lauravuo wants to merge 1 commit into
marvinpinto:masterfrom
lauravuo:add-support-for-notes-autogeneration

Conversation

@lauravuo

Copy link
Copy Markdown

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
Copy Markdown

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

@oliversalzburg

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

@natarajanc-prodigygame

Copy link
Copy Markdown

@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
Copy Markdown

Maybe I'm confused about the difference. Here is a release that was built yesterday: https://github.com/oliversalzburg/cbc-kitten-scientists/releases/tag/nightly my config for that is https://github.com/oliversalzburg/cbc-kitten-scientists/blob/master/.github/workflows/userscript-nightly.yml

@natarajanc-prodigygame

Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown

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

lauravuo commented Jun 5, 2022

Copy link
Copy Markdown
Author

@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

repo: context.repo.repo,
tag_name: releaseTag,
name: args.releaseTitle ? args.releaseTitle : releaseTag,
...(args.autoGenerateReleaseNotes ? {} : {name: args.releaseTitle ? args.releaseTitle : releaseTag}),

@natarajanc-prodigygame natarajanc-prodigygame Jun 7, 2022

Copy link
Copy Markdown

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

sbe-arg commented Jun 28, 2023

Copy link
Copy Markdown
Collaborator

can you rebase so we can merge?

@crowbarmaster

Copy link
Copy Markdown

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