Skip to content

Commit

Permalink
Merge pull request #411: Add workflow to auto update Homebrew Casks
Browse files Browse the repository at this point in the history
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
mjcheetham authored Jul 24, 2020
2 parents 78c5d1b + 0b383f6 commit 44869ce
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/homebrew-release.yml
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

0 comments on commit 44869ce

Please sign in to comment.