mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

Set `fetch-depth: 0` for `actions/checkout` in `CI` pipeline #218

Closed qasimwarraich closed 10 months ago

qasimwarraich commented 10 months ago

This should add the missing changelog. Seems like a fetch-depth of 0 needs to be set for the action to work properly. This is mentioned here in the docs for the goreleaser-action.

I setup a little test repo to test these changes out. Feel free to take a look: CI workflow file Releases w/ changelog

Resolves: #217

miekg commented 10 months ago

i don't see how a fetch depth of 0 will allow you to create a changelog containing previous commits, though?

qasimwarraich commented 10 months ago

I believe it has to do with actions/checkout performing a shallow clone of the repo.

From the actions/checkout README:

Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags. Refer here to learn which commit $GITHUB_SHA points to for different events.

miekg commented 10 months ago

[ Quoting @.***> in "Re: [mmarkdown/mmark] Set `fetch-de..." ]

I believe it has to do with actions/checkout performing a shallow clone of the repo.

From the actions/checkout README:

Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags. Refer here to learn which commit $GITHUB_SHA points to for different events.

ah, thanks for setting me straight.

Cheers!