From 82912620bed6fc79a04a0ff848b1f6395e42ae5e Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 21 Dec 2023 12:25:10 -0800 Subject: [PATCH] publish workflow --- .github/workflows/publish.yaml | 23 +++++++++++++++++++++++ pyproject.toml | 13 ++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..ae85bd5 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,23 @@ +name: publish + +on: + release: + types: + - created + +jobs: + publish: + runs-on: ubuntu-latest + environment: release + 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 + poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} + poetry publish + - 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"