Read-only mirror of github.com/ondeinference/ed.
Mirrored from https://github.com/ondeinference/ed.git
Synced Nov 23, 01:00 UTC
ci: fail the crates.io release when a planned crate is missing
cargo-workspaces 0.4.2 exits 0 even when crates.io rejects an upload. In v1.5.0 the trusted-publishing token expired after four crates and the other four got a 403, yet the job passed. Add a step that checks every crate in the plan against the crates.io index and fails the job if any is absent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
Seto Elkahfi committed
Nov 20, 2026 at 07:57 UTC
57aca77f3b306aa6a4e314a4d074bad1d6997a9b
2 files changed
+27
.agents/skills/release/SKILL.md
+5
@@ -141,6 +141,11 @@ here — this is the safety net for step 6.
141
- Workspace-member dev-deps must be path-only (`foo = { path = "../foo" }`), not
142
`foo.workspace = true`. cargo-workspaces strips dev-deps that carry a version,
143
which changes `Cargo.lock` and fails the `--locked` publish (ed-claude 1.4.0).
144
+- The trusted-publishing token is short-lived. In v1.5.0 it expired after four
145
+ of the eight crates and the rest got `403 Invalid authentication token`, but
146
+ cargo-workspaces 0.4.2 still exited 0. A final step now checks every planned
147
+ crate against the crates.io index and fails the job if one is missing. Fix a
148
+ failed run by dispatching the workflow again on the same tag (see below).
149
150
### `release-sdk-swift.yml` → XCFramework + `ed-swift`
151
.github/workflows/release-sdk-rust.yml
+22
@@ -122,6 +122,28 @@ jobs:
122
--locked \
123
--publish-interval 15 \
124
--token "$TOKEN"
125
+ # cargo-workspaces 0.4.2 logs "published" and exits 0 even when crates.io
126
+ # rejects an upload. In v1.5.0 the trusted-publishing token expired partway
127
+ # through and the last four crates got a 403, yet this job went green. So
128
+ # ask the registry about every crate in the plan and fail if any is absent.
129
+ # After a failure, re-run through workflow_dispatch: the plan then holds
130
+ # only the missing crates and the auth step issues a fresh token.
131
+ - name: Verify every planned crate reached crates.io
132
+ if: steps.plan.outputs.count != '0'
133
+ run: |
134
+ python3 - <<'PY' > planned.txt
135
+ import json
136
+ for crate in json.load(open("plan.json")):
137
+ print(crate["name"], crate["version"])
138
+ PY
139
+ missing=0
140
+ while read -r name version; do
141
+ python3 scripts/crates-io-published.py "$version" --crate "$name" --wait || missing=1
142
+ done < planned.txt
143
+ if [ "$missing" -ne 0 ]; then
144
+ echo "::error::at least one planned crate is not on crates.io; re-run this workflow with publish=true and the same release_tag"
145
+ exit 1
146
+ fi
147
- name: Nothing to publish
148
if: steps.plan.outputs.count == '0'
149
run: echo "Every publishable crate at this version is already on crates.io."