diff --git a/.github/workflows/update_wheels.yml b/.github/workflows/update_wheels.yml new file mode 100644 index 0000000..3a0bfcc --- /dev/null +++ b/.github/workflows/update_wheels.yml @@ -0,0 +1,41 @@ +name: Release + +on: + release: + types: + - published + +jobs: + dist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build SDist and wheel + run: pipx run build + + - uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/* + + - name: Check metadata + run: pipx run twine check dist/* + + publish: + needs: [dist] + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + environment: pypi + + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} diff --git a/setup.py b/setup.py index 8dee5a1..157bbcc 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="detoxify", - version="0.5.1", + version="0.5.2", description="A python library for detecting toxic comments", long_description=long_description, long_description_content_type="text/markdown", @@ -25,5 +25,5 @@ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ], - python_requires=">=3.6", + python_requires=">=3.7", )