diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..573829f --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,36 @@ +name: Publish Python Package to PyPI + +on: + release: + types: [created] # Trigger only when a new release is published + +permissions: + id-token: write # Needed for trusted publishing with PyPI + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pureshell # Link to the PyPI project + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + # No `with: password:` is needed here because we are using trusted publishing. + # Ensure PyPI is configured to trust this repository and workflow for the 'pureshell' package. diff --git a/pyproject.toml b/pyproject.toml index 6f1101a..c3aaebc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta" [project] name = "pureshell" -version = "0.1.0" -description = "A Python module for impartial computation. Implements the Functional Core, Stateful Shell pattern." +version = "0.2.0" +description = "pureshell is a Python library providing a framework for the \"Functional Core, Stateful Shell\" architectural pattern. It guides you to write business logic as pure, static functions within Ruleset classes, while StatefulEntity objects manage state and delegate operations. This promotes highly testable, maintainable, and understandable code. Key features include @shell_method for declarative logic linking, @ruleset_provider for default behavior, and dynamic injection of Ruleset instances for runtime flexibility (e.g., strategy pattern, mock testing)." authors = [ { name="Dane Jones", email="danerjones@gmail.com" } ]