diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..bac4ce9 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,25 @@ +name: Upload Python Package + +on: + release: + types: [release] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.gitignore b/.gitignore index c51f3be..dd84ca7 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ next-env.d.ts # hasil cache dari mypy .mypy_cache + +# cache dari dist +dist diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8d7fca1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,67 @@ +[project] +name = "OpenSeriesBellshade" +version = "1.0.0" +dynamic = [ + "dependencies" +] +description = "library untuk membantu temen-temen dalam perhitungan matematika" +readme = "README.md" +requires-python = ">=3.11.6" +keywords = [ + "OpenSeries", + "openseries" +] +license = {text = "MIT"} +authors = [ + {name = "bellshade wpu kelas terbuka"}, +] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] + +[tool] +[tool.setuptools.packages.find] +include = ["OpenSeries*"] +exclude = ["example"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} + +[tool.distutils.bdist_wheel] +universal = true + +[project.urls] +Homepage = "https://github.com/bellshade/OpenSeries" + +[build-system] +requires = ["setuptools>=64", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[tool.bumpver] +current_version = "1.0.0" +version_pattern = "MAJOR.MINOR.PATCH" +commit_message = "bump version {old_version} -> {new_version}" +commit = true +tag = true +push = true + +[tool.bumpver.file_patterns] +"pyproject.toml" = [ + 'current_version = "{version}"', +] +"setup.py" = [ + "{version}", + "{pep440_version}", +] +"README.md" = [ + "{version}", + "{pep440_version}", +] +