Skip to content

publish.yml read three secrets that do not exist - #104

Merged
brentrager merged 1 commit into
mainfrom
fix/publish-secrets
Aug 20, 2026
Merged

publish.yml read three secrets that do not exist#104
brentrager merged 1 commit into
mainfrom
fix/publish-secrets

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

The last thing between the four SDKs and a working release

publish.yml referenced secrets.CARGO_REGISTRY_TOKEN, secrets.NUGET_API_KEY and secrets.PYPI_API_TOKEN. None of them exist for this repo, at either level:

gh api /repos/SmooAI/observability/actions/secrets              -> total_count 0
gh api /repos/SmooAI/observability/actions/organization-secrets -> GH_PAT,
    SMOOAI_CARGO_REGISTRY_TOKEN, SMOOAI_NPM_TOKEN,
    SMOOAI_NUGET_API_KEY, SMOOAI_PYPI_TOKEN

A missing secret is the empty string in a GitHub expression, not an error. Every publish job would have installed a toolchain, run its full test suite, packaged cleanly — and only then failed at the upload with an auth error, or sent an unauthenticated request. Invisible until someone pushes a tag, which is the one moment you least want to find out.

Fix

Point every job at the org secrets that do exist — the same ones SmooAI/logger uses to publish smooai-logger today:

registry now reads
crates.io SMOOAI_CARGO_REGISTRY_TOKEN
NuGet NUGET_API_KEY || SMOOAI_NUGET_API_KEY — repo-level first (where fetch and logger keep theirs), org-level as fallback
PyPI SMOOAI_PYPI_TOKEN, via uv publish

The Python job also drops OIDC Trusted Publishing. That path needed three things that are not true here: a pypi environment (this repo has zero environments configured), a Trusted Publisher registered on PyPI for repo+workflow+environment, and — for a package that does not exist yet — a pending publisher created by hand first. Three manual setup steps to enable a path the org already has a working token for.

Preflight

Each publish job now refuses to start when its credential resolves to empty — before the suite runs, rather than after a clean package at the upload step. Skipped on dry runs, where no credential is needed.

RELEASING.md updated to name the real secrets and to say plainly that all three already exist, so the runbook does not send anyone to create tokens they already have.

🤖 Generated with Claude Code

https://claude.ai/code/session_0152bbE1veqfG1SVJdyLCBxC

The workflow referenced `secrets.CARGO_REGISTRY_TOKEN`,
`secrets.NUGET_API_KEY` and `secrets.PYPI_API_TOKEN`. None of them exist for
this repo at either level:

    gh api /repos/SmooAI/observability/actions/secrets           -> total_count 0
    gh api .../actions/organization-secrets -> GH_PAT,
      SMOOAI_CARGO_REGISTRY_TOKEN, SMOOAI_NPM_TOKEN,
      SMOOAI_NUGET_API_KEY, SMOOAI_PYPI_TOKEN

A missing secret is the EMPTY STRING in a GitHub expression, not an error. So
every publish job would have installed a toolchain, run its full suite, packaged
cleanly, and only then failed at the upload — or sent an unauthenticated one.
This is the last thing standing between the four SDKs and a working release, and
it is invisible until someone pushes a tag.

Points every job at the org secrets that DO exist, which is also how
SmooAI/logger publishes smooai-logger today:

- crates.io: SMOOAI_CARGO_REGISTRY_TOKEN
- NuGet: NUGET_API_KEY || SMOOAI_NUGET_API_KEY — repo-level first, because that
  is where fetch and logger keep theirs, org-level as the fallback, so it works
  whichever is present
- PyPI: SMOOAI_PYPI_TOKEN via `uv publish`

The Python job also drops OIDC Trusted Publishing, which needed three things
that are not true here: a `pypi` environment (this repo has ZERO environments),
a Trusted Publisher registered on PyPI for repo+workflow+environment, and — for
a package that does not exist yet — a PENDING publisher created by hand FIRST.
That is three manual steps to enable a path the org already has a working token
for.

Each publish job now also refuses to start when its credential is empty, before
the suite runs rather than after a clean package. Skipped on dry runs, where no
credential is needed.

RELEASING.md updated to name the real secrets and to say plainly that all three
already exist — nothing to create.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152bbE1veqfG1SVJdyLCBxC
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3bac264

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brentrager
brentrager merged commit 7e821b2 into main Aug 20, 2026
8 checks passed
@brentrager
brentrager deleted the fix/publish-secrets branch August 20, 2026 18:59
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.

1 participant