From 963a036716c7c8d2e65dd4dea67cf2e1463009bd Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 31 Jul 2023 07:03:44 -0700 Subject: [PATCH] Create publish_pypi.yml --- .github/workflows/publish_pypi.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish_pypi.yml diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml new file mode 100644 index 0000000000..21f1074f0b --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,33 @@ +name: Publish to PyPI +on: + push: + branches: + - master # You can change this to the branch you want to publish from +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 # You can change this to the Python version required for your package + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Install twine + run: pip install twine + + - name: Upload to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload dist/*