Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
]
Expand Down