From 7fb3dfec6f413cd807a1f97b28201f36782a0f8d Mon Sep 17 00:00:00 2001 From: Muhammad Anas Raza Date: Fri, 23 Feb 2024 22:46:40 -0500 Subject: [PATCH] add publish workflow --- .github/workflows/publish_pypi.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 0000000..8b68290 --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,29 @@ +name: Build and Publish to PyPI + +on: + release: + types: [created] # Trigger on new releases + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' # Adjust the version if needed + + - name: Install dependencies + run: pip install build twine + run: pip install -r requirements.txt + run: pip install tensorflow + + - name: Build the package + run: python pip_build.py + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file