-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #411: Add workflow to auto update Homebrew 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.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Update Homebrew Tap | ||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: version | ||
name: Compute version number | ||
run: | | ||
echo "::set-output name=result::$(echo $GITHUB_REF | sed -e "s/^refs\/tags\/v//")" | ||
- id: hash | ||
name: Compute release asset hash | ||
uses: mjcheetham/asset-hash@v1 | ||
with: | ||
asset: Installers_macOS_Release.zip | ||
hash: sha256 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update scalar Cask | ||
uses: mjcheetham/update-homebrew@v1.1 | ||
with: | ||
token: ${{ secrets.HOMEBREW_TOKEN }} | ||
tap: microsoft/git | ||
name: scalar | ||
type: cask | ||
version: ${{ steps.version.outputs.result }} | ||
sha256: ${{ steps.hash.outputs.result }} | ||
alwaysUsePullRequest: true | ||
- name: Update scalar-azrepos Cask | ||
uses: mjcheetham/update-homebrew@v1.1 | ||
with: | ||
token: ${{ secrets.HOMEBREW_TOKEN }} | ||
tap: microsoft/git | ||
name: scalar-azrepos | ||
type: cask | ||
version: ${{ steps.version.outputs.result }} | ||
sha256: ${{ steps.hash.outputs.result }} | ||
alwaysUsePullRequest: true |