Skip to content

Commit c681664

Browse files
committed
add the publisher
1 parent f115a06 commit c681664

File tree

4 files changed

+96
-7
lines changed

4 files changed

+96
-7
lines changed

.github/workflows/publish.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Upload Python Package
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release-build:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
pip install build twine
28+
29+
- name: Build release distributions
30+
run: python -m build
31+
32+
- name: Verify build
33+
run: twine check dist/*
34+
35+
- name: Upload distributions
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: release-dists
39+
path: dist/
40+
41+
publish:
42+
runs-on: ubuntu-latest
43+
needs: release-build
44+
if: github.event_name == 'release' && github.event.action == 'published'
45+
timeout-minutes: 10
46+
permissions:
47+
id-token: write
48+
49+
environment:
50+
name: pypi
51+
url: https://pypi.org/project/YOTRACO/
52+
53+
steps:
54+
- name: Download a distribution artifact
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: release-dists
58+
path: dist
59+
60+
- name: Publish to TestPyPI
61+
uses: pypa/gh-action-pypi-publish@release/v1
62+
with:
63+
repository_url: https://test.pypi.org/legacy/
64+
username: __token__
65+
password: ${{ secrets.test_pypi_password }}
66+
67+
- name: Publish to PyPI
68+
uses: pypa/gh-action-pypi-publish@release/v1
69+
with:
70+
username: __token__
71+
password: ${{ secrets.pypi_password }}
72+
73+
- name: Notify on failure
74+
if: failure()
75+
run: echo "Build or upload failed. Check logs."

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[project]
2-
name = "textpipe"
2+
name = "Textpipe"
33
version = "0.1.0"
4-
description = "all in one tool for text tokenization and vectorization"
4+
description = "all in one tool for text processing"
55
authors = [
6-
{ name="CodexEsto", email="[email protected]" }
6+
{ name="Textpipe Team", email="[email protected]" }
77
]
88
requires-python = ">=3.7"
99
dependencies = [

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ pytest-cov
44
pandas
55
bs4
66
requests
7-
numpy
7+
numpy
8+
nltk
9+
sphinx

setup.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup, find_packages
22

33
setup(
4-
name="textpipe",
4+
name="Textpipe",
55
version="0.1.0",
66
packages=find_packages(),
77
install_requires=[
@@ -13,10 +13,22 @@
1313
"beautifulsoup4",
1414
"pytest", # Usually listed under extras, but fine here too
1515
],
16-
author="Your Name",
17-
description="all in one tool for text tokenization and vectorization",
16+
author="Textpipe Team",
17+
author_email="[email protected]",
18+
license="MIT",
19+
python_requires=">=3.6",
20+
keywords="text processing, text analysis, natural language processing",
21+
description="all in one tool for text processing",
22+
long_description=open("README.md").read(),
23+
long_description_content_type="text/markdown",
24+
url="https://github.com/CodexEsto/textpipe",
1825
classifiers=[
1926
"Programming Language :: Python :: 3",
2027
"Operating System :: OS Independent",
28+
"License :: OSI Approved :: MIT License",
29+
"Development Status :: 4 - Beta",
30+
"Intended Audience :: Developers",
31+
"Natural Language :: English",
2132
],
33+
2234
)

0 commit comments

Comments
 (0)