Skip to content

build: package metadata, CI, and trusted publishing - #8

Merged
AbsoluteMode merged 1 commit into
mainfrom
feat/pypi-packaging
Jul 27, 2026
Merged

build: package metadata, CI, and trusted publishing#8
AbsoluteMode merged 1 commit into
mainfrom
feat/pypi-packaging

Conversation

@AbsoluteMode

Copy link
Copy Markdown
Owner

Зачем

В pyproject.toml были только name, version и зависимости — ни описания, ни лицензии,
ни readme, ни ссылок, ни классификаторов. В таком виде пакет нельзя опубликовать так, чтобы
он выглядел прилично. Плюс в репозитории вообще не было CI.

Что внутри

  • Метаданные: summary, readme, SPDX-лицензия MIT, автор, keywords, 10 классификаторов,
    ссылки на репозиторий и issues.
  • tests.yml: pytest на 3.11/3.12/3.13 × Linux/macOS + отдельная job со сборкой
    (python -m build + twine check) на каждый PR — чтобы упаковка ломалась на PR, а не в
    момент релиза.
  • publish.yml: публикация на PyPI через Trusted Publishing (OIDC) по событию release.
    Токенов не существует нигде — нечему утекать и нечего ротировать.

Проверено локально

Successfully built session_recall-0.4.0.tar.gz and session_recall-0.4.0-py3-none-any.whl
twine check: PASSED (оба артефакта)

Метаданные в колесе на месте, оба console scripts (session-recall, session-recall-mcp)
объявлены.

Что нужно сделать руками (я туда не хожу)

На pypi.org завести trusted publisher для проекта session-recall:
owner AbsoluteMode, репозиторий session-recall, workflow publish.yml, environment pypi.
Имя session-recall на PyPI сейчас свободно.

🤖 Generated with Claude Code

The project had name, version and dependencies and nothing else — no summary,
license, readme, urls or classifiers — so it could not be published anywhere
recognisable. Fills those in and pins the SPDX license expression.

Adds two workflows, the repo had none:

- tests: pytest across 3.11-3.13 on Linux and macOS, plus a build job that runs
  `python -m build` and `twine check` on every PR. Packaging breaks quietly and
  is discovered at release time otherwise.
- publish: PyPI upload over Trusted Publishing (OIDC) on a published release.
  No API token is stored anywhere, so there is nothing to leak or rotate.

Verified locally: both distributions build and pass `twine check`, and the wheel
carries the metadata and both console scripts.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@AbsoluteMode
AbsoluteMode merged commit 50fe9a9 into main Jul 27, 2026
7 checks passed
@AbsoluteMode
AbsoluteMode deleted the feat/pypi-packaging branch July 27, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants