name: Update lunatic homebrew version
on:
release:
types: published
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: "Update version"
run: |
export VERSION=$(echo ${GITHUB_REF/refs\/tags\//} | sed -E 's/.*v([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)/\1/')
curl -X POST \
-H 'Authorization: token ${{ secrets.HOMEBREW }}' \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/lunatic-solutions/homebrew-lunatic/actions/workflows/ci.yml/dispatches \
-d '{"ref": "main",
"inputs": { "version": "'$VERSION'" }
}'