From 4b495786d83a9adbacc2684e92d3f16ccea8df00 Mon Sep 17 00:00:00 2001 From: Laura Hanu <32672979+laurahanu@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:06:52 +0000 Subject: [PATCH 1/6] added workflow to update pypi --- .github/workflows/update_wheels.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/update_wheels.yml diff --git a/.github/workflows/update_wheels.yml b/.github/workflows/update_wheels.yml new file mode 100644 index 0000000..9fa9147 --- /dev/null +++ b/.github/workflows/update_wheels.yml @@ -0,0 +1,42 @@ +name: Release + +on: + workflow_dispatch: + pull_request: + 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 + permissions: + id-token: PYPI_TOKEN + + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From 94ee789932865f6a9aaa70e1ead77e652757f221 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:09:07 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/update_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_wheels.yml b/.github/workflows/update_wheels.yml index 9fa9147..7627990 100644 --- a/.github/workflows/update_wheels.yml +++ b/.github/workflows/update_wheels.yml @@ -39,4 +39,4 @@ jobs: path: dist merge-multiple: true - - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + - uses: pypa/gh-action-pypi-publish@release/v1 From 3a4647b85d5c2a580043a14704288ea46c654812 Mon Sep 17 00:00:00 2001 From: Laura Hanu <32672979+laurahanu@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:13:26 +0000 Subject: [PATCH 3/6] fix variable --- .github/workflows/update_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_wheels.yml b/.github/workflows/update_wheels.yml index 7627990..9b02187 100644 --- a/.github/workflows/update_wheels.yml +++ b/.github/workflows/update_wheels.yml @@ -30,7 +30,7 @@ jobs: if: github.event_name == 'release' && github.event.action == 'published' environment: pypi permissions: - id-token: PYPI_TOKEN + id-token: ${{ secrets.PYPI_TOKEN }} steps: - uses: actions/download-artifact@v4 From 6f98fd70b06577dcb5e9ab5b62db5d3e995ee1ef Mon Sep 17 00:00:00 2001 From: Laura Hanu <32672979+laurahanu@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:27:56 +0000 Subject: [PATCH 4/6] update variable take 2 --- .github/workflows/update_wheels.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_wheels.yml b/.github/workflows/update_wheels.yml index 9b02187..a657f07 100644 --- a/.github/workflows/update_wheels.yml +++ b/.github/workflows/update_wheels.yml @@ -1,6 +1,9 @@ name: Release on: + # push: + # branches: + # - main workflow_dispatch: pull_request: release: @@ -29,8 +32,6 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' environment: pypi - permissions: - id-token: ${{ secrets.PYPI_TOKEN }} steps: - uses: actions/download-artifact@v4 @@ -40,3 +41,6 @@ jobs: merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} From 5965d2e912f13c40b170ba25e59e415ca57d12e0 Mon Sep 17 00:00:00 2001 From: Laura Hanu <32672979+laurahanu@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:34:15 +0000 Subject: [PATCH 5/6] remove unnecessary lines --- .github/workflows/update_wheels.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/update_wheels.yml b/.github/workflows/update_wheels.yml index a657f07..3a0bfcc 100644 --- a/.github/workflows/update_wheels.yml +++ b/.github/workflows/update_wheels.yml @@ -1,11 +1,6 @@ name: Release on: - # push: - # branches: - # - main - workflow_dispatch: - pull_request: release: types: - published From 782dccd44f63972791f0c426296466b3e12c15e0 Mon Sep 17 00:00:00 2001 From: Laura Hanu <32672979+laurahanu@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:35:36 +0000 Subject: [PATCH 6/6] new version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", )