Skip to content

ci(release): dispatch crates.io publish from release.yml, not just tag push#539

Merged
githubrobbi merged 1 commit into
mainfrom
ci/crates-publish-dispatch
Jul 7, 2026
Merged

ci(release): dispatch crates.io publish from release.yml, not just tag push#539
githubrobbi merged 1 commit into
mainfrom
ci/crates-publish-dispatch

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

Why

The crates-io-publish OIDC job in release-plz.yml was gated only on push: tags: v*. But the release tag is created by release.yml via softprops/action-gh-release using GITHUB_TOKEN, and GitHub's anti-loop policy means a GITHUB_TOKEN tag does not trigger push: tags. So the automated release path (release-auto-triggerrelease.yml) never fires the crates publish — as seen on v0.6.24, which released binaries + winget but did not publish uffs-time/uffs-text.

Fix (mirrors the existing submit-winget pattern)

  • release-plz.yml: add a publish_tag workflow_dispatch input; crates-io-publish also runs on workflow_dispatch when publish_tag is set, and checks out that tag to publish the exact released version. release-pr/release stay off for such dispatches. OIDC trusted-publisher registration (workflow release-plz.yml + environment crates.io-publish) unchanged.
  • release.yml: add a submit-crates job that dispatches release-plz.yml with publish_tag=<tag> after the release lands — exactly like submit-winget dispatches winget-publish.yml.

Recovery for v0.6.24

No new version needed. Once this is on main and the v0.6.24 tag exists, a one-off gh workflow run release-plz.yml --ref main -f publish_tag=v0.6.24 publishes uffs-time/uffs-text 0.6.24 (with the README). All future releases publish automatically.

🤖 Generated with Claude Code

…g push

The crates-io-publish OIDC job was gated only on `push: tags: v*`, but
the release tag is created by release.yml via softprops/action-gh-release
using GITHUB_TOKEN — and GitHub's anti-loop policy means a GITHUB_TOKEN
tag does NOT trigger `push: tags`. So the automated release path
(release-auto-trigger → release.yml) never fired the crates publish; only
a manual `just release-tag` (real credential) would have.

Fix by mirroring the submit-winget pattern:
  * release-plz.yml: add a `publish_tag` workflow_dispatch input; the
    crates-io-publish job now also runs on workflow_dispatch when
    publish_tag is set, and checks out that tag to publish the exact
    released version. release-pr / release jobs stay off for such
    dispatches (inputs.publish_tag == ''). The OIDC trusted-publisher
    registration (workflow release-plz.yml + environment crates.io-publish)
    is unchanged.
  * release.yml: add a submit-crates job that dispatches release-plz.yml
    with publish_tag=<tag> after the release lands — exactly like
    submit-winget dispatches winget-publish.yml.

Now every release publishes uffs-time/uffs-text via trusted publishing,
no long-lived token. actionlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi githubrobbi enabled auto-merge July 7, 2026 21:30
@githubrobbi githubrobbi added this pull request to the merge queue Jul 7, 2026
Merged via the queue into main with commit a178301 Jul 7, 2026
20 checks passed
@githubrobbi githubrobbi deleted the ci/crates-publish-dispatch branch July 7, 2026 21:46
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