From 4bf2d5315fdad0dba641c849e699f10cdc78cbf4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 02:22:47 +0000 Subject: [PATCH] Publish to PyPI automatically when the version changes on main Tag pushes and manual dispatch aren't available to every contributor; releasing on a version bump merged to main needs neither. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Koo8a1vU5D6JttUkzjxE6H --- .github/workflows/publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d92989c..94f5531 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,12 @@ name: Publish to PyPI -# Push a tag like v2.0.0 (or run manually) to build and upload to https://pypi.org/p/telegram-channel-scraper. -# Uses PyPI Trusted Publishing — no API token stored in GitHub. +# Releases https://pypi.org/p/telegram-channel-scraper with PyPI Trusted Publishing (no API token stored). +# To release: bump `version` in pyproject.toml and merge to main (or push a v* tag, or run manually). +# An already-published version is skipped, so unrelated edits to pyproject.toml are harmless. on: push: + branches: [main] + paths: [pyproject.toml, .github/workflows/publish.yml] tags: ["v*"] workflow_dispatch: @@ -37,3 +40,5 @@ jobs: name: dist path: dist/ - uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true