Skip to content

Commit

Permalink
Create update-homebrew-tap.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pakerwreah committed Aug 14, 2024
1 parent 37a0a76 commit 09b1cd6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/update-homebrew-tap.yml
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

0 comments on commit 09b1cd6

Please sign in to comment.