Skip to content

fusionAIze Gate v2.5.0 #30

fusionAIze Gate v2.5.0

fusionAIze Gate v2.5.0 #30

Workflow file for this run

name: Notify Homebrew Tap
on:
release:
# `edited` lets a `gh release edit --title` retroactively unblock the
# title-convention check after a `published` event failed validation,
# without needing to delete and recreate the release.
types: [published, edited]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Validate release title convention
# Required format: "fusionAIze Gate vX.Y.Z" (no subtitle)
run: |
TITLE="${{ github.event.release.name }}"
if echo "$TITLE" | grep -qE '^fusionAIze Gate v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Release title OK: $TITLE"
else
echo "::error::Release title must be exactly 'fusionAIze Gate vX.Y.Z'. Got: $TITLE"
echo "::error::Fix: gh release edit ${{ github.event.release.tag_name }} --repo fusionAIze/faigate --title 'fusionAIze Gate ${{ github.event.release.tag_name }}'"
exit 1
fi
- name: Compute SHA256
id: sha
run: |
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
URL="https://github.com/fusionAIze/faigate/archive/refs/tags/v${VERSION}.tar.gz"
SHA=$(curl -sL "$URL" | sha256sum | awk '{print $1}')
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "sha256=${SHA}" >> "$GITHUB_OUTPUT"
- name: Dispatch to homebrew-tap
uses: actions/github-script@v7
with:
github-token: ${{ secrets.TAP_GITHUB_TOKEN }}
script: |
await github.rest.repos.createDispatchEvent({
owner: 'fusionAIze',
repo: 'homebrew-tap',
event_type: 'formula-update',
client_payload: {
formula: 'faigate',
version: '${{ steps.sha.outputs.version }}',
sha256: '${{ steps.sha.outputs.sha256 }}',
},
});
console.log('Dispatched formula-update for faigate v${{ steps.sha.outputs.version }}');