-
Notifications
You must be signed in to change notification settings - Fork 662
50 lines (44 loc) · 1.52 KB
/
homebrew.yml
File metadata and controls
50 lines (44 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
- name: Load GitHub release token
id: github-creds
uses: gittools/cicd/github-creds@v5
with:
op_service_account_token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- uses: mislav/bump-homebrew-formula-action@v4
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
push-to: gittools-bot/homebrew-core
commit-message: |
{{formulaName}} {{version}}
For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }}
env:
COMMITTER_TOKEN: ${{ steps.github-creds.outputs.github_release_token }}