Skip to content

Commit

Permalink
Merge pull request #102 from unitaryai/update_wheel_action
Browse files Browse the repository at this point in the history
Workflow to update pypi
  • Loading branch information
laurahanu committed Feb 1, 2024
2 parents e918243 + 782dccd commit 773203c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/update_wheels.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -25,5 +25,5 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
python_requires=">=3.7",
)

0 comments on commit 773203c

Please sign in to comment.