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 helper script for creating GitHub releases using gh #143

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

rvem
Copy link
Member

@rvem rvem commented Sep 20, 2023

Problem: Some of our projects have a job in the CI pipeline that creates GitHub release with some release artifacts. We'd like to unify the approach for creating such releases.

Solution: Add autorelease script to 'lib.github.autorelease'.

@rvem rvem requested a review from a team September 20, 2023 14:30

# gh expects 'GH_TOKEN' env variable to be set
# Delete release if it exists
gh release delete "$release_tag" --yes || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, I'm not familiar with this gh cli, so please correct me if I'm wrong.
For me this delete seems too destructive. If the problem is really the presence of an existing release with the same name, I would opt to be deleted by a human being.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.
I didn't want to complicate the arguments parser since it's quite painful to do non-trivial arg parsing in bash, so I decided to do this via dedicated env variable

Problem: Some of our projects have a job in the CI pipeline that creates
GitHub release with some release artifacts. We'd like to unify the
approach for creating such releases.

Solution: Add autorelease script to 'lib.github.autorelease'.
@rvem rvem merged commit 567820a into master Sep 22, 2023
1 check passed
@delete-merged-branch delete-merged-branch bot deleted the rvem/github-release-script branch September 22, 2023 13:58
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

Successfully merging this pull request may close these issues.

2 participants