taiki-e / create-gh-release-action

GitHub Action for creating GitHub Releases based on changelog.
Apache License 2.0
72 stars 11 forks source link

Will it fail if a changelog doesn't have the right version? #22

Closed lmajano closed 1 year ago

lmajano commented 1 year ago

Will the build step fail if you specify a changelog.md but the tag you are building is not in the file?

Is there a way, to allow it to pass even if the changelog doesn't contain the tag version?

taiki-e commented 1 year ago

In the current implementation, if the changelog option is specified, an entry corresponding to the version must be present in the changelog.

That said, I think it would be easy to add an option to allow cases where the corresponding changelog entry is missing. Probably it needs to change the following line to return an empty string if the option to allow missing entry is set. https://github.com/taiki-e/create-gh-release-action/blob/0a3a16aba523e2d3ff92a744269fc789c14df703/main.sh#L113

Something like:


if [[ -n "${INPUT_ALLOW_MISSING_CHANGELOG_ENTRY:-}" ]]; then
    notes=$(./parse-changelog "${parse_changelog_options[@]}" || echo "") 
else
    notes=$(./parse-changelog "${parse_changelog_options[@]}") 
fi
lmajano commented 1 year ago

I went ahead and did this and sent you a PR: https://github.com/taiki-e/create-gh-release-action/pull/23

Great docs and app layout. It was easy to get in, make changes, and collaborate. I wish all open-source projects were like this.