-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Using release drafter in combination with goreleaser #207
Comments
Hi @arminc, do you have a link to your repo? |
@crazy-max Here it is: https://github.com/arminc/k8s-platform-lcm |
@arminc I think it's a release-drafter constraint and you should also apply this step in your - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_REPO }}
- name: Publish Release Notes
uses: release-drafter/release-drafter@v5
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_REPO }} |
I have tried it out but it doesn't seem to work out. I will do some more testing or open an issue with release-drafter. |
@crazy-max Thanks for the quick help. As you can see in this issue release-drafter/release-drafter#542 release drafter currently can't do a publish. In my opinion that kind of makes sense. Shouldn't it be goreleasers job to use a draft if it is already there? |
release-drafter/release-drafter/pull/546 should greatly improve the experience. You can even write something like this after the PR is merged: name: Release Drafter
on:
push:
branches:
- master
tags:
- v*
release:
types: [deleted]
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Draft Release
uses: release-drafter/release-drafter@v5
with:
publish: ${{ contains(github.ref, "ref/tags") }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} With the following below it will allow you to publish on tags and automatically redraft and republish any deleted releases. on:
push:
tags:
- v*
release:
types: [deleted] |
Hi @jetersen thanks for the tips! We will wait for the validation of this PR ;) |
@jetersen As release-drafter/release-drafter/pull/546 is merged it should be ok now? |
The combination still isn't working. What happens now is goreleaser creates the release with the assets, then release-drafter sees there has been a release and then releases a new version which is not what you want. I tried adding version to the release-drafter but it's not picking it up? Basically what needs to happen is that either goreleaser takes the draft and uses that to release if one is available or release-drafter needs to be able to update release instead of creating a new one, to make this work. |
@arminc as I mentioned you will properly need to flip the order. |
Will try that now |
though looking into goreleaser it would look like it will create the release. However we could in release-drafter easily fox so that it would not bump the version if |
Seems you were successful: https://github.com/arminc/k8s-platform-lcm/releases/tag/0.11.0 |
Yes, with realease-drafter having created a draft 0.11.0, then a release happens where release-drafter actually creates the 0.11.0 release (only with the publish flag, not forcing the version). Then gorelease runs and adds the assets. So it seems it works now :) |
You properly want to use
|
Though not sure how that works with tags now that I think about it 🤔 |
I will need to look into that, haven't read about the difference NEXT_MINOR_VERSION and RESOLVED_VERSION. |
I am using https://github.com/marketplace/actions/release-drafter to create a draft release for every PR. When I do a release with goreleaser with changelog skip to true it creates a new release instead of using the draft.
I was wondering if this should work and if so how? If not then it means I either need to accept I can only use goreleasers commits or maybe try to use https://github.com/buchanae/github-release-notes as input? Any other solutions or examples where people use PR for notes with goreleaser?
The text was updated successfully, but these errors were encountered: