From 0ac652beeeda700e8712795d7aed537fa9536925 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Mon, 15 Jun 2026 01:39:12 +0200 Subject: [PATCH] ci: publish gitea package as browser-cli --- .gitea/workflows/publish.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index a830b89..ac4bed2 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -17,8 +17,31 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 - - name: Build package - run: uv build + - name: Build Gitea package + run: | + # Keep the public/PyPI distribution as real-browser-cli in the repo, + # but publish the private Gitea package under browser-cli. + python - <<'PY' + from pathlib import Path + + replacements = { + Path("pyproject.toml"): ( + 'name = "real-browser-cli"', + 'name = "browser-cli"', + ), + Path("browser_cli/constants.py"): ( + 'PYPI_PACKAGE_NAME = "real-browser-cli"', + 'PYPI_PACKAGE_NAME = "browser-cli"', + ), + } + + for path, (old, new) in replacements.items(): + text = path.read_text() + if old not in text: + raise SystemExit(f"expected text not found in {path}: {old}") + path.write_text(text.replace(old, new, 1)) + PY + uv build - name: Publish to Gitea run: |