Skip to content
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

github release creates a tag on publish #96

Closed
rchincha opened this issue Nov 15, 2021 · 2 comments
Closed

github release creates a tag on publish #96

rchincha opened this issue Nov 15, 2021 · 2 comments

Comments

@rchincha
Copy link

Trying to integrate your changelog generator workflow into:
https://github.com/anuvu/zot

However, the workflow breaks like so:
https://github.com/anuvu/zot/runs/4215543984?check_suite_focus=true

As part of github release, github insists on creating a new tag and this appears to confuse this workflow. Should base-ref be set to the previous tag instead of latest tag? Maybe I am just using this workflow incorrectly.

@metcalfc
Copy link
Owner

metcalfc commented Nov 22, 2021

This is the way to use it by default:

- name: Generate changelog
  id: changelog
  uses: metcalfc/changelog-generator@v1.0.0
  with:
    myToken: ${{ secrets.GITHUB_TOKEN }}

This automatically moves the changelog between the point and time you run the action and the last release. The action assumes that you have created a real GitHub release and not just a tag.

You can also use the action to generate notes between any valid reference (hash, tag, branch, whatever). You just have to update the workflow somehow to do that.

My project flow is make updates. npm version patch and that generates a tag formatted as vX.Y.Z. Pushing that tag kicks off the release workflow which builds the notes and creates a GitHub release from the tag. Here is the workflow:

https://github.com/metcalfc/changelog-generator/blob/main/.github/workflows/release.yml

You'll see that I generate the notes and then create a GitHub release. So the notes get calculated between the last release and right before I create the next release.

@metcalfc
Copy link
Owner

metcalfc commented Dec 4, 2021

Thanks for checking out the action. I hope the default does what you need. I'll close this for now. Feel free to reopen if there is something about this action that the built in doesn't handle.

@metcalfc metcalfc closed this as completed Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants