ci: dispatch Homebrew update after publishing Furumi
This commit is contained in:
1 parent
bb215790a7
commit
1f806fd44d
1 file changed
+24
@@ -107,3 +107,27 @@ jobs:
|
||||
--title "furumi ${RELEASE_TAG}" \
|
||||
--notes "Release ${RELEASE_TAG}" \
|
||||
--verify-tag
|
||||
|
||||
update-homebrew:
|
||||
name: Dispatch Homebrew formula update
|
||||
needs: publish
|
||||
if: github.server_url == 'https://github.com' && github.repository == 'Furumi-stack/furumi-tui'
|
||||
runs-on: ubuntu-latest
|
||||
permissions: {}
|
||||
steps:
|
||||
- name: Trigger workflow in the Homebrew tap
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "Skipping Homebrew for non-stable tag $RELEASE_TAG"
|
||||
exit 0
|
||||
fi
|
||||
if [[ -z "$GH_TOKEN" ]]; then
|
||||
echo "::error::Set the HOMEBREW_TAP_TOKEN repository secret to dispatch the Homebrew update."
|
||||
exit 1
|
||||
fi
|
||||
gh workflow run update-furumi.yml \
|
||||
--repo house-of-vanity/homebrew-tap --ref main --raw-field "tag=$RELEASE_TAG"
|
||||
Reference in new issue
Block a user