cocogitto / cocogitto-action

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

[question] How to detect that no bump was done and no new tag was generated #22

Closed eshepelyuk closed 4 months ago

eshepelyuk commented 4 months ago

When I push a commit like this chore: some chores - there are no actual release expected to be done. So the workflow could detect this and skip all further steps.

But currently there's no way or I can't find it how to detect that there were no bump performed.

I suggest to not create a step output in this case, so subsequent steps can analyze this and skip if needed.

eshepelyuk commented 4 months ago

I think some code should be added here https://github.com/cocogitto/cocogitto-action/blob/main/cog.sh#L36

To detect if a new tag was generated or not.

eshepelyuk commented 4 months ago

Also, I realize that this can be achieved via post bump hook, where hook can store env variable or step output. But it would be more convenient if the action could do this itself.

oknozor commented 4 months ago

I am not sure to sure to understand your issue, here is the current behavior when there are no version bump since the latest release tag.

image

Has you can see the release is skipped and cog return a zero status code. This is not considered an error.

eshepelyuk commented 4 months ago

nevermind, I'll workaround this with hook.