diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a3728ca --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,24 @@ +name: publish + +on: + release: + types: + - created + +jobs: + publish: + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - run: pipx install poetry + - uses: actions/setup-python@v5 + with: + cache: poetry + - run: | + poetry version -- ${GIT_REF_NAME#v} + poetry build + - uses: pypa/gh-action-pypi-publish@release/v1 + - run: gh release upload $GIT_REF_NAME dist/* diff --git a/pyproject.toml b/pyproject.toml index c41e346..be5ddac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,12 @@ [tool.poetry] name = "ollama" -version = "0.1.0" +version = "0.0.0" description = "The official Python client for Ollama." authors = ["Ollama "] +license = "MIT" readme = "README.md" +homepage = "https://ollama.ai" +repository = "https://github.com/jmorganca/ollama-python" [tool.poetry.dependencies] python = "^3.8" @@ -17,6 +20,10 @@ pytest-httpserver = "^1.0.8" pillow = "^10.1.0" ruff = "^0.1.8" +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + [tool.ruff] indent-width = 2 @@ -27,7 +34,3 @@ indent-style = "space" [tool.ruff.lint] select = ["E", "F", "B"] ignore = ["E501"] - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api"