diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index ee6a817..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Upload Python Package - -on: - workflow_dispatch: # Manual trigger only - workflow disabled from auto-running - -#on: -# release: -# types: [created] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: 3.11 - - - - name: Install build and twine - run: pip install build twine - - name: Build and publish - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: | - if [ -z "${PYPI_TOKEN}" ]; then echo "Set the PYPI_TOKEN variable in your repository secrets"; exit 1; fi - python -m build - python -m twine upload dist/* --username __token__ --password $PYPI_TOKEN - diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..68b567f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Publish Python Package + +on: + release: + types: [created] + + +env: + # Set this to true manually in the GitHub workflow UI if you want to publish to PyPI + # Will always publish to testpypi + PUBLISH_TO_PYPI: true + +jobs: + publish: + name: Publish the serena-agent package + runs-on: ubuntu-latest + + permissions: + id-token: write # Required for trusted publishing + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v6 + with: + version: "latest" + + - name: Build package + run: uv build + + - name: Upload artifacts to GitHub Release + if: env.PUBLISH_TO_PYPI == 'true' + uses: softprops/action-gh-release@v2 + with: + files: | + dist/*.tar.gz + dist/*.whl + + - name: Publish to TestPyPI + run: uv publish --index testpypi + + - name: Publish to PyPI (conditional) + if: env.PUBLISH_TO_PYPI == 'true' + run: uv publish diff --git a/pyproject.toml b/pyproject.toml index d1dcf9b..7bcb2ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,8 @@ build-backend = "hatchling.build" requires = ["hatchling"] [project] -name = "serena" -version = "0.1.0" +name = "serena-agent" +version = "2025.07.20" description = "" authors = [{ name = "Oraios AI", email = "info@oraios-ai.de" }] readme = "README.md" @@ -36,6 +36,12 @@ dependencies = [ "anthropic>=0.54.0", ] +[[tool.uv.index]] +name = "testpypi" +url = "https://test.pypi.org/simple/" +publish-url = "https://test.pypi.org/legacy/" +explicit = true + [project.scripts] serena = "serena.cli:top_level" serena-mcp-server = "serena.cli:start_mcp_server" diff --git a/src/serena/__init__.py b/src/serena/__init__.py index 1643d83..20d8b75 100644 --- a/src/serena/__init__.py +++ b/src/serena/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2025-06-21" +__version__ = "2025.07.20" import logging