Skip to content

Commit 0b383f6

Browse files
committed
homebrew: add workflow to auto update casks
Add a GitHub workflow that is triggered on creation and publish of a release on GitHub, to update the `scalar` and `scalar-azrepos` Casks on the microsoft/git Homebrew Tap.
1 parent 78c5d1b commit 0b383f6

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 "::set-output name=result::$(echo $GITHUB_REF | sed -e "s/^refs\/tags\/v//")"
14+
- id: hash
15+
name: Compute release asset hash
16+
uses: mjcheetham/asset-hash@v1
17+
with:
18+
asset: Installers_macOS_Release.zip
19+
hash: sha256
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Update scalar Cask
22+
uses: mjcheetham/update-homebrew@v1.1
23+
with:
24+
token: ${{ secrets.HOMEBREW_TOKEN }}
25+
tap: microsoft/git
26+
name: scalar
27+
type: cask
28+
version: ${{ steps.version.outputs.result }}
29+
sha256: ${{ steps.hash.outputs.result }}
30+
alwaysUsePullRequest: true
31+
- name: Update scalar-azrepos Cask
32+
uses: mjcheetham/update-homebrew@v1.1
33+
with:
34+
token: ${{ secrets.HOMEBREW_TOKEN }}
35+
tap: microsoft/git
36+
name: scalar-azrepos
37+
type: cask
38+
version: ${{ steps.version.outputs.result }}
39+
sha256: ${{ steps.hash.outputs.result }}
40+
alwaysUsePullRequest: true

0 commit comments

Comments
 (0)