diff --git a/.github/workflows/update-homebrew.yml b/.github/workflows/update-homebrew.yml index 96d4565c..c41df133 100644 --- a/.github/workflows/update-homebrew.yml +++ b/.github/workflows/update-homebrew.yml @@ -3,6 +3,11 @@ name: Update Homebrew Formula on: release: types: [published] + workflow_dispatch: + inputs: + tag: + description: 'Release tag (e.g., v0.22.0)' + required: true permissions: contents: read @@ -19,8 +24,13 @@ jobs: - name: Get release info id: release run: | - echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + TAG="${{ github.event.inputs.tag }}" + else + TAG="${GITHUB_REF#refs/tags/}" + fi + echo "tag=${TAG}" >> $GITHUB_OUTPUT + echo "version=${TAG#v}" >> $GITHUB_OUTPUT - name: Download checksums run: |