Publish to Homebrew #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to Homebrew | |
on: | |
workflow_run: | |
workflows: ["Upload Python Package"] | |
types: | |
- completed | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install -U commitizen | |
- name: Set Project version env variable | |
run: | | |
echo "project_version=$(cz version --project)" >> $GITHUB_ENV | |
- name: Update Homebrew formula | |
uses: dawidd6/action-homebrew-bump-formula@v3 | |
with: | |
token: ${{secrets.PERSONAL_ACCESS_TOKEN}} | |
formula: commitizen | |
tag: v${{ env.project_version }} | |
force: true |