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
33 changes: 31 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'README.md'
branches:
- main
tags:
- v*.*
pull_request:
branches:
- main
Expand All @@ -19,11 +21,11 @@ jobs:
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -34,3 +36,30 @@ jobs:
- name: Run tests
run: |
make test
release:
needs: test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/plux
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
id: setup-python
uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: Build release
run: make dist

- name: List artifacts
run: ls -lah dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ venv.bak/

# don't ignore build package
!plux/build

# Ignore dynamically generated version.py
plux/version.py
4 changes: 2 additions & 2 deletions plux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
plugin,
)
from plux.runtime.manager import PluginContainer, PluginManager
from plux.version import __version__

name = "plux"

__version__ = "1.14.0"

__all__ = [
"FunctionPlugin",
"Plugin",
Expand All @@ -34,4 +33,5 @@
"PluginSpecResolver",
"PluginType",
"plugin",
"__version__"
]
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ['hatchling']
requires = ['hatchling', 'hatch-vcs']
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -35,8 +35,11 @@ dev = [
"ruff==0.9.1",
]

[tool.hatch.build.hooks.vcs]
version-file = "plux/version.py"

[tool.hatch.version]
path = "plux/__init__.py"
source = "vcs"

[tool.ruff]
line-length = 110
Expand Down