From 2e99b3998e7a0dec0559b853517d58e71ba444f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=B6=E6=9D=96?= Date: Wed, 11 Dec 2024 21:22:36 +0800 Subject: [PATCH] Refactor GitHub Actions workflow for Homebrew tap updates - Changed the trigger for the update-homebrew.yml workflow to run upon the completion of the "Build and Release" workflow on the main branch, enhancing the automation process. - Added a conditional check to ensure the job only runs if the previous workflow concluded successfully. - Updated comments in the script for improved clarity. These changes streamline the workflow and improve its reliability. --- .github/workflows/update-homebrew.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-homebrew.yml b/.github/workflows/update-homebrew.yml index 4b41b47..eb5fe61 100644 --- a/.github/workflows/update-homebrew.yml +++ b/.github/workflows/update-homebrew.yml @@ -1,11 +1,16 @@ name: Update Homebrew Tap on: - release: - types: [published] + workflow_run: + workflows: ["Build and Release"] + types: + - completed + branches: + - main jobs: update-tap: + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: macos-latest steps: - name: Checkout tap @@ -40,7 +45,7 @@ jobs: fi echo "sha256=$SHA256" >> $GITHUB_OUTPUT - # ���出信息用于调试 + # 输出信息用于调试 echo "Version: $VERSION" echo "SHA256: $SHA256"