Skip to content

Commit 6b7e624

Browse files
mjcheethamvdye
authored andcommitted
homebrew: add GitHub workflow to release Cask
Add a GitHub workflow that is triggered on the `release` event to automatically update the `microsoft-git` Homebrew Cask on the `microsoft/git` Tap. A secret `HOMEBREW_TOKEN` with push permissions to the `microsoft/homebrew-git` repository must exist. A pull request will be created at the moment to allow for last minute manual verification. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent e756cec commit 6b7e624

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update Homebrew Tap
2+
on:
3+
release:
4+
types: [released]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- id: version
11+
name: Compute version number
12+
run: |
13+
echo "result=$(echo $GITHUB_REF | sed -e "s/^refs\/tags\/v//")" >>$GITHUB_OUTPUT
14+
- id: hash
15+
name: Compute release asset hash
16+
uses: mjcheetham/asset-hash@v1.1
17+
with:
18+
asset: /git-(.*)\.pkg/
19+
hash: sha256
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Update scalar Cask
22+
uses: mjcheetham/update-homebrew@v1.3
23+
with:
24+
token: ${{ secrets.HOMEBREW_TOKEN }}
25+
tap: microsoft/git
26+
name: microsoft-git
27+
type: cask
28+
version: ${{ steps.version.outputs.result }}
29+
sha256: ${{ steps.hash.outputs.result }}
30+
alwaysUsePullRequest: false

0 commit comments

Comments
 (0)