Skip to content

fix(ci): PyPI publish never ran, and could not have worked anyway - #20

Merged
donbagger merged 1 commit into
mainfrom
fix/pypi-publish-trigger
Aug 14, 2026
Merged

fix(ci): PyPI publish never ran, and could not have worked anyway#20
donbagger merged 1 commit into
mainfrom
fix/pypi-publish-trigger

Conversation

@donbagger

Copy link
Copy Markdown
Contributor

Found while checking whether 0.9.0 reached PyPI. It did not, and there are two
separate reasons, each of which alone would have been enough.

1. The workflow never fired

The trigger was release: created. That worked while releases were made by
hand. Once release.yml started cutting them from tags, it became a dead end:
GitHub does not trigger workflows from events raised with the default
GITHUB_TOKEN
, to avoid recursion.

So for v0.9.0 the tag landed, release.yml created the release as
github-actions[bot], and publish.yml was never invoked. No error anywhere,
just silence.

Now it triggers on the tag directly, the same event release.yml uses. The two
run in parallel and neither depends on the other.

2. The credentials could not have worked

PyPI stopped accepting username and password. The existing
TWINE_USERNAME/TWINE_PASSWORD pair returns:

ERROR HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/

That is what the run on 2026-08-14 12:49 failed on, and the one before it in
March. So even if the trigger had worked, this would have failed.

Switched to the token form: literal __token__ as the username, an API token as
the password.

What this PR does not fix

Someone has to add PYPI_API_TOKEN in repo settings, scoped to this project.
Once it exists, PYPI_USERNAME and PYPI_PASSWORD can be deleted.

Until then, 0.9.0 has to be uploaded by hand. Worth considering
Trusted Publishing instead, which
needs no stored secret at all, but that requires configuration on the PyPI side
so I have left it as a suggestion rather than assuming it.

Note for the other repos

release.yml in dexpaprika-mcp, dexpaprika-sdk-go, dexpaprika-sdk-ts and
dexpaprika-sdk-php has the same bot-token property. It does not matter there
because nothing chains off the release, but it is worth knowing before anyone
adds a publish step that listens for one.

Two independent faults, both silent.

**It never fired.** The trigger was `release: created`. Once release.yml started
cutting releases automatically, that became a dead end: GitHub does not trigger
workflows from events raised with the default GITHUB_TOKEN, precisely to avoid
recursion. So v0.9.0 was tagged, the release appeared, and nothing reached PyPI.
Now it triggers on the tag directly, the same event release.yml uses, so neither
depends on the other.

**The credentials are dead.** PyPI stopped accepting username and password;
TWINE_USERNAME/TWINE_PASSWORD returns 403 Forbidden from upload.pypi.org. That is
what the 2026-08-14 12:49 run failed on, and the March run before it. Switched to
the token form: literal __token__ as the username, an API token as the password.

**Needs a secret before it works:** add PYPI_API_TOKEN in repo settings, scoped to
this project. The old PYPI_USERNAME and PYPI_PASSWORD can then be deleted.

Until that secret exists, 0.9.0 has to go up by hand.
@donbagger
donbagger merged commit 276e369 into main Aug 14, 2026
7 checks passed
@donbagger
donbagger deleted the fix/pypi-publish-trigger branch August 14, 2026 15:18
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