Repository navigation
fix: trigger releases for version tags - #6
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Actions release workflow so releases can be triggered both automatically from version tags and manually via workflow_dispatch, enabling re-publishing an existing tag.
Changes:
- Fix tag trigger pattern for
pushevents ("v*"). - Add
workflow_dispatchinput (tag) to publish an existing version tag manually. - Use the selected tag/ref when checking out code and naming release assets.
Suppressed comments (3)
.github/workflows/release.yml:27
ref: ${{ inputs.tag || github.ref }}will fail on thepushtrigger because theinputscontext doesn't exist outsideworkflow_dispatch/workflow_call. Use an event-name guard so tag pushes can still run.
with:
fetch-depth: 0
ref: ${{ inputs.tag || github.ref }}
.github/workflows/release.yml:49
- This workflow runs on
pushas well asworkflow_dispatch, butinputs.tagis referenced directly. Onpushruns theinputscontext is undefined and the expression will error. Guard theinputsaccess withgithub.event_name.
- name: Prepare release assets
env:
TAG: ${{ inputs.tag || github.ref_name }}
run: |
.github/workflows/release.yml:56
TAG: ${{ inputs.tag || github.ref_name }}will fail for thepushtrigger because theinputscontext doesn't exist there. Guard it withgithub.event_name == 'workflow_dispatch'so tag pushes can still create releases.
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ inputs.tag || github.ref_name }}
run: gh release create "$TAG" "CashEye-${TAG}.apk" "CashEye-${TAG}.apk.sha256" --generate-notes --title "CashEye $TAG"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
16
to
18
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| group: release-${{ inputs.tag || github.ref }} | ||
| cancel-in-progress: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.