ci: publish gitea package as browser-cli
Testing / test (push) Successful in 1m13s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 57s
Testing / remote-protocol-compat (0.9.5) (push) Successful in 53s
Build & Publish Package / publish (push) Successful in 51s
Package Extension / package-extension (push) Successful in 1m9s

This commit is contained in:
2026-06-15 01:39:12 +02:00
parent 7cb2a8b618
commit 0ac652beee
+25 -2
View File
@@ -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: |