From dff1cafa46af1643acba908a8502658e90627087 Mon Sep 17 00:00:00 2001 From: SebastianMorawiec <108305907+SebastianMorawiec@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:19:56 +0200 Subject: [PATCH] Feat: Workflow to release benchq to PyPi (#107) --- .../build-python-wheel-via-cicd-actions.yaml | 41 +++++++++++++++++++ setup.cfg | 4 +- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-python-wheel-via-cicd-actions.yaml diff --git a/.github/workflows/build-python-wheel-via-cicd-actions.yaml b/.github/workflows/build-python-wheel-via-cicd-actions.yaml new file mode 100644 index 00000000..b95eb5f0 --- /dev/null +++ b/.github/workflows/build-python-wheel-via-cicd-actions.yaml @@ -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 }} diff --git a/setup.cfg b/setup.cfg index 87568abb..d47274f4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,10 +33,10 @@ install_requires = numpy>=1.20 more-itertools~=9.1.0 pandas==1.5.3 - pyLIQTR @ git+https://github.com/isi-usc-edu/pyLIQTR.git + pyLIQTR==0.3.3 openfermion~=1.5.0 pytest # required by OpenFermion's resource_estimates module - graph-state-generation @ git+https://github.com/sfc-aqua/gosc-graph-state-generation + graph-state-generation==0.2.0 juliapkg==0.1.10 juliacall~=0.9.10 h5py~=3.8.0