-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37a0a76
commit 09b1cd6
Showing
1 changed file
with
32 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,32 @@ | ||
name: Update Homebrew Cask | ||
|
||
on: | ||
push: # remove me | ||
workflow_dispatch: # manual | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-cask: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
name: pakerwreah/homebrew-calendr | ||
|
||
- name: Calculate sha256 checksum | ||
id: checksum | ||
run: | | ||
curl -L -o Calendr.zip https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/Calendr.zip | ||
echo "::set-output name=sha256::$(sha256sum Calendr.zip | awk '{ print $1 }')" | ||
- name: Update Homebrew Cask | ||
working-directory: homebrew-calendr | ||
run: | | ||
sed -i "s|version \".*\"|version \"${{ github.event.release.tag_name }}\"|" calendr.rb | ||
sed -i "s|sha256 \".*\"|sha256 \"${{ steps.checksum.outputs.sha256 }}\"|" calendr.rb | ||
git add calendr.rb | ||
git commit -m "Update Calendr to version ${{ github.event.release.tag_name }}" | ||
git push |