4a19d70af1
Lint with Ruff / ruff (push) Has been cancelled
MCP Server Tests / live-mcp-tests (push) Has been cancelled
Tests / unit-tests (push) Has been cancelled
Tests / database-integration-tests (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Server Tests / live-server-tests (push) Has been cancelled
Pyright Type Check / pyright (push) Has been cancelled
38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
name: Release to PyPI
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*.*.*"]
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
environment:
|
|
name: release
|
|
url: https://pypi.org/p/zep-cloud
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
|
|
with:
|
|
version: "latest"
|
|
- name: Compare pyproject version with tag
|
|
run: |
|
|
TAG_VERSION=${GITHUB_REF#refs/tags/}
|
|
PROJECT_VERSION=$(uv run python -c "import tomllib; print('v' + tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
|
|
if [ "$TAG_VERSION" != "$PROJECT_VERSION" ]; then
|
|
echo "Tag version $TAG_VERSION does not match the project version $PROJECT_VERSION"
|
|
exit 1
|
|
fi
|
|
- name: Build project for distribution
|
|
run: uv build
|
|
- name: Publish package distributions to PyPI
|
|
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
|