Skip to content

publish-release

publish-release #38

Workflow file for this run

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 }}