File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update Homebrew Formulae
2
+ on :
3
+ release :
4
+ types : [released]
5
+
6
+ workflow_dispatch :
7
+ push :
8
+ branches : [main]
9
+ paths :
10
+ - .github/workflows/brew-update.yaml
11
+
12
+ jobs :
13
+ Update :
14
+ runs-on : macos-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Tap
20
+ run : |
21
+ brew tap ${{ github.repository_owner }}/yamlscript
22
+ brew install ys
23
+
24
+ - name : Livecheck
25
+ id : livecheck
26
+ env :
27
+ HOMEBREW_GITHUB_API_TOKEN : ${{ github.token }}
28
+ run : |
29
+ brew livecheck --newer-only --quiet --json ys |
30
+ jq --raw-output '"version=\(.[].version.latest)"' >> $GITHUB_OUTPUT
31
+
32
+ - name : Configure Git
33
+ if : steps.livecheck.outputs.version != ''
34
+ run : |
35
+ git config --global user.name ${{ github.repository_owner }}
36
+ git config --global user.email ${{ github.event.pusher.email }}
37
+
38
+ - name : Bump Version
39
+ if : steps.livecheck.outputs.version != ''
40
+ env :
41
+ version : ${{ steps.livecheck.outputs.version }}
42
+ GH_TOKEN : ${{ secrets.ACCESS_TOKEN }}
43
+ run : |
44
+ util/brew-update $version
45
+ cd homebrew-yamlscript
46
+ gh auth setup-git
47
+ git add --all
48
+ git commit --message "Update $version"
49
+ git push
You can’t perform that action at this time.
0 commit comments