New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't quite get auto-changelog right in github release notes. githubRelease runs before git commit/tag #1098
Comments
current workaround is something like - name: 'Bump Version'
run: npx release-it --ci -VV --no-github.release $version
- name: 'Create Release'
run: npx release-it --ci -VV --no-increment --no-git
|
You could also look into using https://github.com/release-it/release-it/blob/main/docs/github-releases.md#release-notes |
Use the verbose or debug options to see the order of things and more details: https://github.com/release-it/release-it?tab=readme-ov-file#troubleshooting--debugging |
Thanks for replying. I did use -VV to figure out what I think was happening. I don't think auto-changelog is able to create the notes they right way until the tag/commit is there. I think I tried every combination. I guess a function could possibly chop out the previous release notes if I run auto-changelog with the options that cause double release notes. |
I've been using |
Also, this arguably is an auto-changelog issue/request. I'm also not stuck on auto-changelog. I could just try conventional or keepachangelog Or just put the git log into the githubRelease... |
With any tool, also make sure to verify things by simply running the commands in sequence manually. |
Closing this one, but feel free to continue discussion or open new ones. |
I think the issue is that github.releaseNotes runs before the new tag is created. I can't find an auto-changelog set up to make this work.
Say you have v0.6.6 and release-it is bumping to v0.6.7
In --ci, If you run like:
or
--ending-version=main
In your github.releaseNotes script, you will not get the 0.6.7 notes. You get v0.6.6 again. The v0.6.7 tag hasn't been created yet.
If you use the auto-changelog option:
-p, --package [file]
:The stdout includes v0.6.6 and v0.6.7. There are two versions included in the release notes. The current and the previous.
auto-changelog throw
TypeError: Invalid version. Must be a string. Got type "undefined".
Would it break a bunch of existing users if githubRelease ran after the tag is created?
The only workaround I found so far is to run release-it twice. First with no githubRelase and second with --no-git.
I used literal values above. My releaseNotes script is some variation of:
npx release-it -VV --ci --dry-run
Actually I guess here it's completely empty because the commit to package.jason hasn't been done yet either.
oh here's the config too:
The text was updated successfully, but these errors were encountered: