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

add ability to mark Gitea/GitHub release as draft #676

Closed
1 task
Tracked by #417
MarcoIeni opened this issue Apr 8, 2023 · 4 comments · Fixed by #986
Closed
1 task
Tracked by #417

add ability to mark Gitea/GitHub release as draft #676

MarcoIeni opened this issue Apr 8, 2023 · 4 comments · Fixed by #986
Labels
enhancement New feature or request good first issue Good for newcomers priority:high Really important. We should do this.

Comments

@MarcoIeni
Copy link
Owner

MarcoIeni commented Apr 8, 2023

Motivations

This feature is useful if you want to update other artifacts to the release later and you want to publish the release after the update was successful. Also if you want to review the release and publish it manually afterwards.

Solution

The config field already exists:

pub draft: Option<bool>,

but it's not used. Use it here:
pub async fn create_github_release(&self, tag: &str, body: &str) -> anyhow::Result<()> {

The GitHub api call is documented here. As you can see you need to add a draft field in the body. This change should also work for Gitea. 👍

  • also document this field in the docs. Specify that GitLab doesn't support it
@MarcoIeni MarcoIeni added the enhancement New feature or request label Apr 8, 2023
@MarcoIeni MarcoIeni added the good first issue Good for newcomers label Apr 8, 2023
@MarcoIeni MarcoIeni added the priority:low This can wait label Apr 16, 2023
@MarcoIeni MarcoIeni changed the title configuration: add ability to mark release as draft configuration: add ability to mark Gitea/GitHub release as draft Aug 27, 2023
@MarcoIeni MarcoIeni changed the title configuration: add ability to mark Gitea/GitHub release as draft add ability to mark Gitea/GitHub release as draft Aug 27, 2023
@jdidion
Copy link

jdidion commented Sep 20, 2023

+1

This is essential if you want to use in conjunction with cargo-dist for adding binaries to releases and publishing afterwards.

@MarcoIeni MarcoIeni added priority:high Really important. We should do this. and removed priority:low This can wait labels Sep 20, 2023
@MarcoIeni
Copy link
Owner Author

Since it's a really easy issue, I hoped somebody else could pick this. If that's not the case, I'll try to implement this soon :)

@MarcoIeni
Copy link
Owner Author

Hey John, I have implemented this feature, and I will release the new release-plz version now.
If you manage to use release-plz with cargo-dist can you link me the repository?
I would like to document how the two can work together.
Also, let me know if you are interested in documenting your approach in https://release-plz.ieni.dev/docs/extra :)

@jdidion
Copy link

jdidion commented Sep 26, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority:high Really important. We should do this.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants