Skip to content

Commit

Permalink
Create publish-pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamofbce authored Apr 10, 2024
1 parent ce900f2 commit aeb2c5e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish to PyPI

on:
push:
branches:
- main

jobs:
build_and_publish:
name: Build and Publish
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.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: python setup.py sdist bdist_wheel

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload --repository pypi dist/*

0 comments on commit aeb2c5e

Please sign in to comment.