cli / gh-extension-precompile

Action for publishing binary GitHub CLI extensions
MIT License
93 stars 41 forks source link

Do not require a tag to function #9

Open vilmibm opened 2 years ago

vilmibm commented 2 years ago

While it's ok to continue defaulting to running on a tag push, this extension should function without a tag and just use HEAD if run via a generic push or a workflow run trigger. (see discussion in https://github.com/cli/gh-extension-precompile/issues/2#issuecomment-975785158 )

jef commented 2 years ago

I think it does now: https://github.com/cli/gh-extension-precompile/blob/trunk/build_and_release.sh#L21-L25

Probably can be closed now! :)

bewuethr commented 1 year ago

The solution for this implemented in #21 breaks when the most recent tag is not on the commit that's checked out, and the checkout is shallow (which is the default behaviour of actions/checkout); this should probably be documented?

mislav commented 1 year ago

This wasn't solved; that's the reason this issue is still open. Pushing a git tag is still required for this action to function.

The idea is that it might be useful for this action to also have utility when activated on push to a branch or on a workflow_dispatch event. However, that would still mean that the compiled assets need to be stored somewhere, and that somewhere should be a Release, and Releases can only ever be attached to git tags. Therefore, this action should gain the ability to auto-increment a version number in order to generate new git tags when needed.