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 options for token override, draft releases and supplying release tag #37

Merged
merged 10 commits into from
Sep 19, 2023

Conversation

manue1
Copy link
Contributor

@manue1 manue1 commented Sep 15, 2023

As part of the release of an upcoming CLI extension in which the built binary gets uploaded to a secondary repository instead of the one in which the code resides the following options were added:

  • allow creating a draft release
  • allow supplying a github_token input parameter in order to allow using a token other than github.token
  • allow supplying a pre-created release tag

Copy link
Contributor

@andyfeller andyfeller left a comment

Choose a reason for hiding this comment

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

@manue1: Thank you for the contribution!

Would like to delve into a couple aspects of these changes a little more deeply. I appreciate however you can help me understand the improvement these bring 🙇

action.yml Outdated Show resolved Hide resolved
Comment on lines 21 to 24
if [ -n "$GH_RELEASE_TAG" ]; then
echo "invoking release tag override $GH_RELEASE_TAG"
tag="$GH_RELEASE_TAG"
elif [[ $GITHUB_REF = refs/tags/* ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

@manue1 : Could you elaborate on this approach versus deriving the tag from the reference? Is there an example you can share that showcases a concrete example and how others might benefit from this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have a use case for an upcoming CLI extension where the code resides in one repo and has the built binaries published to another separate repo. (see workflow)

Our current plan is to trigger the release manually by dispatching the workflow since it would follow the GHES release window. Instead of creating a release tag in the source repo we'd therefore solely create the tag in the destination repo and GITHUB_REF would therefore not be set when the workflow is run.

I'm also unsure if this is a use case that many others will benefit from. 🤔

action.yml Outdated Show resolved Hide resolved
build_and_release.sh Outdated Show resolved Hide resolved
@manue1 manue1 requested a review from samcoe September 18, 2023 11:25
Copy link
Contributor

@andyfeller andyfeller left a comment

Choose a reason for hiding this comment

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

@manue1 : thank you for your patience!

@samcoe : did you have any final call outs?

build_and_release.sh Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
@manue1 manue1 requested a review from a team as a code owner September 19, 2023 10:29
@manue1 manue1 requested a review from samcoe September 19, 2023 10:35
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making the requested changes.

@samcoe samcoe merged commit 4d676b7 into cli:trunk Sep 19, 2023
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.

3 participants