diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9fae004..8759494 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest environment: pypi permissions: + # Naming any permission drops the defaults, so checkout needs this back. + contents: read id-token: write # lets the job ask GitHub for the token PyPI checks steps: - uses: actions/checkout@v5 diff --git a/HISTORY.md b/HISTORY.md index 0a1c0e1..1bf6fbd 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -455,7 +455,7 @@ Decided (Dec 6, 2026): no `studio-agent demo` command, which the backlog had flo ### Ready for PyPI (done Dec 6, 2026) -PR: [#62](https://github.com/arirusso/studio-agent/pull/62) +PRs: [#62](https://github.com/arirusso/studio-agent/pull/62), [#63](https://github.com/arirusso/studio-agent/pull/63) The package goes on PyPI before the repo goes public, so the README can say "install it" on day one. @@ -464,6 +464,8 @@ The package goes on PyPI before the repo goes public, so the README can say "ins - **README links** are absolute GitHub URLs, since relative ones break on PyPI. They 404 until the repo is public. - **Publishing:** a GitHub release runs `.github/workflows/publish.yml`, which uploads with PyPI's trusted publishing, so no token exists to leak. Chosen over uploading with `twine` and a personal token. +The first release run failed at checkout: the workflow's `permissions` granted only `id-token: write`, and naming any permission drops the defaults, so the job couldn't read the private repo. It now grants `contents: read` too. + Checked: the wheel builds, installs in a clean Python 3.14 virtualenv, and runs `--help` and `status`; `twine check` passes. The sdist also carries `tests/`, which is harmless. ## Earlier