Skip to content

Commit 03c8264

Browse files
committed
Formulaの更新を自動化してくれねえか
1 parent 878dbc5 commit 03c8264

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/release.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ jobs:
5252
-H "Content-Type: application/zip" \
5353
--data-binary @${{ env.RELEASE_FILE }} \
5454
"https://uploads.github.com/repos/otiai10/amesh/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.RELEASE_FILE }}"
55-
- name: Sha
55+
- name: Trigger Formula Update
5656
run: |
57-
openssl sha256 ${{ env.RELEASE_FILE }}
57+
FORMULA=amesh
58+
VERSION=${{ env.RELEASE_TAG }}
59+
SHA256=`openssl sha256 ${{ env.RELEASE_FILE }}`
60+
ZIP_URL="https://github.com/otiai10/amesh/releases/download/${{ env.RELEASE_TAG }}/${{ env.RELEASE_FILE }}"
61+
curl -XPOST \
62+
-u "otiai10:${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
63+
-H "Accept: application/vnd.github.everest-preview+json" \
64+
-H "Content-Type: application/json" \
65+
https://api.github.com/repos/otiai10/homebrew-tap/dispatches \
66+
-d "{
67+
\"event_type\": \"package_update\",
68+
\"client_payload\": {
69+
\"formula\": \"${FORMULA}\",
70+
\"version\": \"${VERSION}\",
71+
\"zip_url\": \"${ZIP_URL}\",
72+
\"sha256\": \"${SHA256}\"
73+
}
74+
}"

0 commit comments

Comments
 (0)