-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add very hacky way to trigger release executables after publish
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |