'How can I create a proper changelog with Github Releases if version tags are not on the main branch?

I cannot find an answer this in the documentation for this feature.

I work on a repository which creates Github Releases from a release branch. When a release is done, i.e. Release_0.2.0 we delete the release branch but the version tag stays on the commit from which the release was built. This version tag, i.e. 0.2.0, does not reside on the main branch except for the very first one we had created long time ago 0.1.0! Now when the next release happens, Release_0.3.0 I want to generate a changelog via the Github Release UI. But it will create a list with all PR's which have been merged since this very first version tag 0.1.0 on main instead of only including all changes since 0.2.0. My testing seems to confirm that Github only looks for previous versions on the main branch starting at the tip of the current release branch. Is that true or what are the rules here? And how can I fix our use of tags to make use of Githubs changelogs without having the tags on the main branch?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source