Skip to content

Commit

Permalink
Add very hacky way to trigger release executables after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Aug 23, 2024
1 parent 1d423a1 commit a434050
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,24 @@ jobs:
pypi_token: ${{ secrets.PYPI_TOKEN }}
package_directory: "opshin"
poetry_install_options: "--without dev"
# add executables to the release
- name: Install jq
uses: dcarbone/[email protected]
- name: Trigger executable build
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/opshin/opshin/releases/latest > datafile.json
jq -r '.tag_name' < datafile > tag_name
jq -r '.upload_url' < datafile > upload_url
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/opshin/opshin/dispatches \
-d '{"event_type":"trigger_binary_build","client_payload":{"ref":"'"$(cat tag_name)"'","upload_url":"'"$(cat upload_url)"'"}}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a434050

Please sign in to comment.