Skip to content

Commit

Permalink
publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed Dec 21, 2023
1 parent dabcca6 commit 8291262
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -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/*
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://ollama.ai"
repository = "https://github.com/jmorganca/ollama-python"

[tool.poetry.dependencies]
python = "^3.8"
Expand All @@ -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

Expand All @@ -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"

0 comments on commit 8291262

Please sign in to comment.