Skip to content

fix(ci): crates.io publish guard and add release Cursor rule#22

Merged
T3pp31 merged 3 commits into
mainfrom
fix/cratesio-publish-guard-user-agent
May 30, 2026
Merged

fix(ci): crates.io publish guard and add release Cursor rule#22
T3pp31 merged 3 commits into
mainfrom
fix/cratesio-publish-guard-user-agent

Conversation

@T3pp31
Copy link
Copy Markdown
Owner

@T3pp31 T3pp31 commented May 30, 2026

Summary

Required before merge: release.yml User-Agent

The publish job failed on v1.0.8 with crates.io API 403 because publish_guard uses curl without User-Agent.

Apply this change in .github/workflows/release.yml (line ~128):

-          PUBLISH_STATUS=$(curl --silent --output /dev/null --write-out "%{http_code}" "https://crates.io/api/v1/crates/${{ steps.crate_metadata.outputs.crate_name }}/${{ steps.crate_metadata.outputs.crate_version }}")
+          PUBLISH_STATUS=$(curl --silent --output /dev/null --write-out "%{http_code}" \
+            -H "User-Agent: caesar_cipher_enc_dec-release (github-actions)" \
+            "https://crates.io/api/v1/crates/${{ steps.crate_metadata.outputs.crate_name }}/${{ steps.crate_metadata.outputs.crate_version }}")

You can commit this on GitHub in this PR (“Edit file” on release.yml) or push locally after:

gh auth refresh -h github.com -s workflow
git push origin fix/cratesio-publish-guard-user-agent

(A local commit with this fix already exists on branch fix/cratesio-publish-guard-user-agent but could not be pushed from CI/agent without the workflow OAuth scope.)

Test plan

T3pp31 and others added 3 commits May 30, 2026 11:05
- Add rust-release-cratesio.mdc for version/tag/publish workflow
- Allow .cursor/rules/*.mdc in git while keeping other .cursor/ local

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@T3pp31 T3pp31 merged commit 99bd4cb into main May 30, 2026
1 check passed
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