From 34b9008242a072957a4f88d85c9d2cb730f38320 Mon Sep 17 00:00:00 2001 From: Rick Gray Date: Sun, 15 Sep 2024 14:29:16 -0500 Subject: [PATCH] initial ci/cd --- .github/workflows/release.yml | 62 +++++++++++++++++++++++++++++++++++ pyproject.toml | 30 +++++++++++++++++ src/kanjivg/__init__.py | 8 +++++ src/kanjivg/kanjivg.py | 3 ++ 4 files changed, 103 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 pyproject.toml create mode 100644 src/kanjivg/__init__.py create mode 100644 src/kanjivg/kanjivg.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..b6bcbf2e3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,62 @@ +name: Release 🚀 + +on: push + +jobs: + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + publish-to-pypi: + name: Publish to PyPI 🐍 + if: startsWith(github.ref, 'refs/tags/') + needs: + - build + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + publish-to-testpypi: + name: Publish to TestPyPI 🐍 + needs: + - build + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..7d791c19f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["setuptools>=64", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[project] +name = "kanjivg" +dynamic = ["version"] +authors = [ + {name = "ospalh"}, + {name = "benkasminbullock"}, + {name = "Gnurou"}, + {name = "eichhirn"} +] +description = "Kanji vector graphics " +readme = "README.md" +requires-python = ">=3.7" +license = {file = "LICENSE"} +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved", + "Operating System :: OS Independent", + "Development Status :: 5 - Production/Stable", + "Topic :: Utilities" +] + +[tool.setuptools_scm] +local_scheme = "no-local-version" + +[project.urls] +Homepage = "https://github.com/KanjiVG/kanjivg" diff --git a/src/kanjivg/__init__.py b/src/kanjivg/__init__.py new file mode 100644 index 000000000..de9a5c5c9 --- /dev/null +++ b/src/kanjivg/__init__.py @@ -0,0 +1,8 @@ +import importlib.metadata as metadata + +__version__ = metadata.version(__name__) +__author__ = metadata.metadata(__name__)['Author'] +__license__ = metadata.metadata(__name__)['License'] +__all__ = [__name__] + +from .kanjivg import * diff --git a/src/kanjivg/kanjivg.py b/src/kanjivg/kanjivg.py new file mode 100644 index 000000000..111f50f35 --- /dev/null +++ b/src/kanjivg/kanjivg.py @@ -0,0 +1,3 @@ +class kanjivg: + def __init__(self) -> None: + pass \ No newline at end of file