diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9a1ea5c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Publish + +on: + release: + types: + - created + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + # Issue ref: https://github.com/actions/setup-python/issues/436 + # cache: "pip" + cache-dependency-path: pyproject.toml + python-version-file: pyproject.toml + + - name: Install poetry + run: python3 -m pip install poetry + + - name: Install dependencies + run: poetry install + + - name: Build package to dist/ + run: poetry build + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 3fe44cb..4465c5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ tracker = "https://github.com/volfpeter/motorhead/issues" [tool.poetry] name = "motorhead" -version = "0.2309.0" +version = "0.2402.0" description = "Async MongoDB with vanilla Pydantic v2+ - made easy." authors = ["Peter Volf "] readme = "README.md"