summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-03-01 09:46:57 -0600
committerSean E. Russell <ser@ser1.net>2020-03-01 09:46:57 -0600
commitfc3a12cd7316f91957c33ee45e9411ab22b35233 (patch)
tree9ab2cdf4c5e27e3d040b5a59437be51e7c3cb24e
parentbfbdfaf2f59539ce1643de153f5b989d98db96b1 (diff)
Trigger Homebrew update on release
-rw-r--r--.github/workflows/release.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..b30ce45
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,26 @@
+# run: |
+# curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/YOURNAME/APPLICATION_NAME/dispatches --data '{"event_type": "update", "client_payload": {"tag": GITHUB_REF }}'
+
+name: Post release triggers
+
+on:
+ release:
+ types: [published]
+
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Get tag name
+ shell: bash
+ run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF##*/})"
+ id: tag_name
+
+ - name: Update Homebrew recipe
+ uses: peter-evans/repository-dispatch@v1
+ with:
+ token: ${{ secrets.REPO_ACCESS_TOKEN }}
+ repository: xxxserxxx/homebrew-gotop
+ event-type: my-event
+ client-payload: '{"tag": "${{ steps.tag_name.outputs.tag }}"}'