Skip to content

Publish to Homebrew

Publish to Homebrew #6

name: Publish to Homebrew
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: "Tag name of the release"
required: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- id: revision
run: echo "revision=$(echo ${{ github.event.release.tag_name || github.event.inputs.tag_name }} | cut -c2-)" >> $GITHUB_OUTPUT
- uses: mislav/bump-homebrew-formula-action@v3
with:
formula-name: project-env-cli
formula-path: Casks/project-env-cli.rb
homebrew-tap: Project-Env/homebrew-tap
base-branch: main
download-url: https://github.com/Project-Env/project-env-cli/releases/download/v${{ steps.revision.outputs.revision }}/cli-${{ steps.revision.outputs.revision }}-macos-amd64.tar.gz
commit-message: bump {{formulaName}} to {{version}}
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_RELEASER_TOKEN }}