Skip to content

Publish homebrew

Publish homebrew #18

name: Publish homebrew
on:
release:
types: [published]
jobs:
test:
name: Publish homebrew formula
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup git user
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: retrieve release tar sha256
run: curl -sL "${{ github.server_url }}/${{ github.repository }}/archive/refs/tags/${{ github.ref_name }}.tar.gz" | shasum -a 256 | cut -d " " -f 1 > sha256.txt
- name: print sha256
run: cat sha256.txt
- name: publish homebrew formula
run: ./hack/homebrew/publish.sh -u mxcd -t ${{ secrets.CI_PAT }} -v ${{ github.ref_name }} -s $(cat sha256.txt)