Skip to content

ci: add release workflow for automating the PyPI publishing process #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading