publish-release #38
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_dispatch: | |
inputs: | |
tag-name: | |
description: 'The git tag name to bump the formula to' | |
required: true | |
repository_dispatch: | |
types: [ publish-release ] | |
permissions: | |
contents: read | |
jobs: | |
homebrew: | |
permissions: | |
contents: none | |
name: Bump Homebrew formula | |
runs-on: macos-latest | |
steps: | |
- name: Get version | |
id: get-version | |
shell: pwsh | |
run: | | |
$version = "${{ github.event.client_payload.tag }}" | |
if ($version -eq "") { | |
$version = "${{ github.event.inputs.tag-name }}" | |
} | |
"version=$version" >> $env:GITHUB_OUTPUT | |
- | |
uses: mislav/bump-homebrew-formula-action@v3 | |
name: Bump Homebrew formula | |
with: | |
formula-name: gitversion | |
tag-name: ${{ steps.get-version.outputs.version }} | |
download-url: https://github.com/GitTools/GitVersion/archive/refs/tags/${{ steps.get-version.outputs.version }}.tar.gz | |
commit-message: | | |
{{formulaName}} {{version}} | |
For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }} | |
env: | |
COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} |