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

Do not create duplicate draft release in GitHub #3148

Closed
2 tasks done
qsliu2017 opened this issue Jun 9, 2022 · 4 comments · Fixed by #3318
Closed
2 tasks done

Do not create duplicate draft release in GitHub #3148

qsliu2017 opened this issue Jun 9, 2022 · 4 comments · Fixed by #3318
Assignees
Labels
enhancement New feature or request

Comments

@qsliu2017
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Our release workflow is like this:

  1. Create a vx.y.z branch, then GitHub Actions create a draft release with the name RELEASE vx.y.z
  2. In the next couple of day, we cherry-pick some bug-fix commit to the release branch as well as fill the content of the release note

The question is a new commit to the release branch will trigger goreleaser again, and create another draft release note (instead of appending to the existing one).

Seems like goreleaser only treat releases with the same tag as the same releases. While the draft release will be assigned a random tag like untagged-1070a2429328d38d3638.

release, _, err = c.client.Repositories.GetReleaseByTag(
ctx,
ctx.Config.Release.GitHub.Owner,
ctx.Config.Release.GitHub.Name,
data.GetTagName(),
)
if err != nil {

Describe the solution you'd like

Consider treating draft releases with the same name as the same release

Describe alternatives you've considered

N/A

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

@qsliu2017 qsliu2017 added enhancement New feature or request triage Issue pending triage by one of the maintainers labels Jun 9, 2022
@qsliu2017 qsliu2017 changed the title Do not create duplicate draft release note Do not create duplicate draft release in GitHub Jun 9, 2022
@caarlos0
Copy link
Member

caarlos0 commented Jun 9, 2022

refs #3073 #3072 cc27fba

@qsliu2017
Copy link
Contributor Author

@caarlos0 Could you explain why #3073 fail? thanks.

@caarlos0
Copy link
Member

yes, if you run goreleaser multiple times, reusing the same release (i.e. the draft), it'll fail to upload the artifacts because they already exist.

so, in order to reuse, you'll probably need to delete the release artifacts first.

@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label Aug 12, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
2 participants