cocogitto / cocogitto-action

A github action to ensure your current gitlog respect the conventional commit specification
22 stars 17 forks source link

[FEATURE] Automatically generate changelog content for a github release #4

Closed tranzystorekk closed 1 year ago

tranzystorekk commented 2 years ago

For one of my projects I have configured a custom release action that, on new version tag creation, generates a cocogitto changelog and then creates a github release with that changelog.

Maybe it would be useful to have something like this incorporated here?

EDIT: the action, for reference

oknozor commented 2 years ago

Actually I did something similar in the latest version: https://github.com/cocogitto/cocogitto/blob/cd847de37cda51950e65d4b4868b8faa6ffcd880/.github/workflows/Release.yml#L41

FYI if you use cocogitto-action to create the version you can use a workflow_dispatch trigger to cog bump by hitting the release button. You can then use ${{ steps.release.outputs.version }} to get the version number and generate the changelog.

oknozor commented 2 years ago

Oh wait do you mean incorporating a github release upload in cocogitto-action ? I though I was answering an issue on the main repo.

tranzystorekk commented 2 years ago

Oh wait do you mean incorporating a github release upload in cocogitto-action ?

Exactly 😄

Actually, I guess softprop already has the release part figured out, so I'm not sure how much cocogitto-action could do without reinventing the wheel...

oknozor commented 2 years ago

I think we can just reuse the softprop action in the composite action : https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsuses Then bind it to some parameter to run it or not.

tranzystorekk commented 2 years ago

I'm afraid this feature is too dependent on personal preference, e.g. whether you want to trigger releases in CI manually or automatically on new tag push, so without a clear use case this will only make the action harder to grok