-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Workflow to release benchq to PyPi (#107)
- Loading branch information
1 parent
a8642ad
commit dff1caf
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
.github/workflows/build-python-wheel-via-cicd-actions.yaml
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Push Python Wheel by triggering cicd-actions workflow via Github API Call | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
trigger-build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger cicd-actions repository workflow over Github API | ||
run: | | ||
curl -L \ | ||
"https://api.github.com/repos/zapatacomputing/cicd-actions/actions/workflows/30157612/dispatches" \ | ||
-H "Authorization: token "$USER_TOKEN \ | ||
-H 'Accept: application/vnd.github+json' \ | ||
--fail-with-body \ | ||
--data-raw ' | ||
{ | ||
"ref": "main", | ||
"inputs": | ||
{ | ||
"repository": "'"$repository"'", | ||
"ref": "'"$ref"'", | ||
"package_directory": "'"$package_directory"'", | ||
"pypi": "true", | ||
"pypitest": "false", | ||
"nexus": "false" | ||
} | ||
} | ||
' | ||
env: | ||
USER_TOKEN: ${{ secrets.PAGES_TOKEN }} | ||
repository: ${{github.repository}} | ||
ref: ${{ github.ref_name }} | ||
package_directory: "." | ||
github_sha: ${{ github.sha }} | ||
build_number: ${{ github.run_number }} | ||
push_pypi: ${{ github.event.inputs.pypi }} | ||
push_pypitest: ${{ github.event.inputs.pypitest }} | ||
push_nexus: ${{ github.event.inputs.nexus }} |
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