diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 9d2c6ff..6142d83 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -4,8 +4,7 @@ on: push: paths: - "setup.py" - branches: - - main + - "pso/__init__.py" permissions: contents: read @@ -28,12 +27,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: | - python setup.py bdist_wheel sdist - twine upload dist/*.whl dist/*.tar.gz + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} diff --git a/.gitignore b/.gitignore index 4c3cffd..3f0b40e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ __pycache__/ *$py.class .ipynb_checkpoints/ - +.vscode/settings.json # pypi dist/ build/ diff --git a/setup.py b/setup.py index 53f4d87..dca8fb1 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,6 @@ setup( "pandas", "ipython", "tensorflow<=2.11.1", - "tensorboard", ], packages=find_packages(exclude=[]), keywords=["pso", "tensorflow", "keras"],