Skip to content

Commit

Permalink
ci: add release workflow for automating the PyPI publishing process (#…
Browse files Browse the repository at this point in the history
…156)

* added workflow for automating the pypi publishing process

---------

Co-authored-by: Eugeny Parshutin <[email protected]>
  • Loading branch information
mk-srivastava and eparshut authored Sep 10, 2024
1 parent 9db30bb commit 08193a5
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Install cibuildwheels
run: python -m pip install cibuildwheel==2.20.0
- name: Build ittapi python wheels
run: python -m cibuildwheel python --output-dir python_dist/${{ runner.os }}
run: python -m cibuildwheel python --output-dir python_dist
env:
CIBW_BUILD: cp3*
CIBW_SKIP: ${{ matrix.cibw_skip_args }}
Expand Down Expand Up @@ -114,3 +114,24 @@ jobs:
asset_path: ./ittapi_build_${{ github.ref_name }}.zip
asset_name: ittapi_build_${{ github.ref_name }}.zip
asset_content_type: application/zip

# upload the built wheels to PyPi
upload_to_pypi:
name: Upload the wheel files to PyPi
runs-on: ubuntu-latest
needs: [python_build, create_release]
steps:
- name: Download artifacts
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
pattern: build-artifacts-*
merge-multiple: true
- name: List wheel files
run: find -name *.whl
- name: Publish package distributions to PyPi
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241 # v1.10.1
with:
password: ${{ secrets.PYPI }}
repository-url: https://upload.pypi.org/legacy/
packages-dir: python_dist
skip-existing: true

0 comments on commit 08193a5

Please sign in to comment.