diff --git a/.github/workflows/publish-pypi-packages.yaml b/.github/workflows/publish-pypi-packages.yaml new file mode 100644 index 0000000..1ffc53c --- /dev/null +++ b/.github/workflows/publish-pypi-packages.yaml @@ -0,0 +1,27 @@ +name: Publish the package to PyPI + +on: + workflow_dispatch: + + +jobs: + publish_pypi: + name: Publish package + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Checkout action repository + uses: actions/checkout@v3 + + - name: Publish package + env: + PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} + PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python3 -m pip install --upgrade twine build + pushd src/python/ + python3 -m build + python3 -m twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD --repository pypi dist/* + popd