Skip to content

Enable manual triggering of release workflow#61

Merged
chefgs merged 3 commits intomainfrom
fix-release-yml
Apr 1, 2026
Merged

Enable manual triggering of release workflow#61
chefgs merged 3 commits intomainfrom
fix-release-yml

Conversation

@chefgs
Copy link
Copy Markdown
Member

@chefgs chefgs commented Apr 1, 2026

This pull request updates the release workflow configuration to require manual triggering instead of running automatically on every push to the main branch.

Release workflow changes:

  • Changed the .github/workflows/release.yml workflow to use workflow_dispatch with a required branch input, enabling manual releases and preventing automatic runs on every push to main.

Added workflow_dispatch event to allow manual triggering with branch input.
@chefgs chefgs marked this pull request as ready for review April 1, 2026 06:39
Copilot AI review requested due to automatic review settings April 1, 2026 06:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the repository’s release workflow from an automatic trigger on pushes to main to a manually triggered workflow via workflow_dispatch, intended to support controlled/manual releases.

Changes:

  • Replaced on: push (main) with on: workflow_dispatch.
  • Added a required branch workflow input (defaulting to main) for manual runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +11
workflow_dispatch:
inputs:
branch:
description: 'Default Branch Name'
required: true
default: 'main'
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

workflow_dispatch adds a required branch input, but it isn’t used anywhere (e.g., actions/checkout still uses the default ref). As-is, the input has no effect and may confuse users. Also, switching from push to workflow_dispatch changes the event payload; later job conditions reference github.event.head_commit.message, which is absent for workflow_dispatch and can cause the job if: expression to behave unexpectedly/fail. Consider (a) using inputs.branch in checkout (ref:) and/or PR base, and (b) guarding the head_commit-based skip logic to only run on push events (or default missing messages to an empty string).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Applied both fixes in df3f986:

  1. inputs.branch wired into checkout — added ref: ${{ inputs.branch }} so the workflow actually checks out the branch the user specifies when triggering manually.
  2. head_commit.message guarded with || '' — each reference to github.event.head_commit.message in the job if: condition now falls back to an empty string when the field is absent (as it is for workflow_dispatch), so the skip-loop guards evaluate correctly without failing.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chefgs chefgs merged commit 7fe8c38 into main Apr 1, 2026
7 checks passed
@chefgs chefgs deleted the fix-release-yml branch April 1, 2026 07:07
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