Skip to content

Commit

Permalink
Formulaの更新を自動化してくれねえか
Browse files Browse the repository at this point in the history
  • Loading branch information
otiai10 committed Jun 1, 2021
1 parent 878dbc5 commit 03c8264
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ jobs:
-H "Content-Type: application/zip" \
--data-binary @${{ env.RELEASE_FILE }} \
"https://uploads.github.com/repos/otiai10/amesh/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.RELEASE_FILE }}"
- name: Sha
- name: Trigger Formula Update
run: |
openssl sha256 ${{ env.RELEASE_FILE }}
FORMULA=amesh
VERSION=${{ env.RELEASE_TAG }}
SHA256=`openssl sha256 ${{ env.RELEASE_FILE }}`
ZIP_URL="https://github.com/otiai10/amesh/releases/download/${{ env.RELEASE_TAG }}/${{ env.RELEASE_FILE }}"
curl -XPOST \
-u "otiai10:${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/otiai10/homebrew-tap/dispatches \
-d "{
\"event_type\": \"package_update\",
\"client_payload\": {
\"formula\": \"${FORMULA}\",
\"version\": \"${VERSION}\",
\"zip_url\": \"${ZIP_URL}\",
\"sha256\": \"${SHA256}\"
}
}"

0 comments on commit 03c8264

Please sign in to comment.