diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 8f63e1b..9975f33 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -3,6 +3,12 @@ name: Update Homebrew Tap on: release: types: [published] + workflow_dispatch: + inputs: + tag: + description: 'Release tag (e.g. v0.4.2)' + required: true + type: string permissions: contents: read @@ -10,12 +16,13 @@ permissions: jobs: homebrew: runs-on: ubuntu-latest - if: "!github.event.release.prerelease" + if: ${{ github.event_name == 'workflow_dispatch' || !github.event.release.prerelease }} steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.release.tag_name || inputs.tag }} - name: Set up Go uses: actions/setup-go@v5 @@ -41,5 +48,5 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add Formula/go-passbolt-cli.rb - git commit -m "Update go-passbolt-cli to ${{ github.event.release.tag_name }}" + git commit -m "Update go-passbolt-cli to ${{ github.event.release.tag_name || inputs.tag }}" git push