publish workflow

This commit is contained in:
Michael Yang 2023-12-21 12:25:10 -08:00
parent dabcca6a1f
commit 9d93f70806
2 changed files with 32 additions and 5 deletions

24
.github/workflows/publish.yaml vendored Normal file
View File

@ -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/*

View File

@ -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 <hello@ollama.com>"]
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"