Skip to content

Commit

Permalink
Merge pull request #32 from dongx1x/workflow
Browse files Browse the repository at this point in the history
workflow: add workflow to publish pypi packages
  • Loading branch information
dongx1x authored Apr 7, 2024
2 parents 5953348 + 4c8fd7a commit 89179f6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-pypi-packages.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 89179f6

Please sign in to comment.