Skip to content

Commit 8f7ee83

Browse files
chore: bump version to 0.3.2 for new release (#230)
* fix: use workspace-level release instead of explicit packages The 'no packages selected' error occurs when using --package flags with shared-version=true. Since we have shared-version configured in release.toml, we should run cargo-release at the workspace level without explicit package selection. * fix: add comprehensive cargo-release debugging and auth verification - Add explicit crates.io authentication verification step - Test token validity with cargo login and dry-run publish - Verify all packages can be published before attempting release - Add detailed debugging output for cargo-release operations - Show package detection and metadata when release fails - Add failure analysis to identify common issues - Set RUST_LOG=cargo_release=debug for verbose output - Use cargo release --list to preview what will be released * chore: bump version to 0.3.2 for new release The 0.3.1 version is already published on crates.io, so we need to bump to 0.3.2 to allow cargo-release to publish successfully.
1 parent 72d9b13 commit 8f7ee83

File tree

3 files changed

+95
-10
lines changed

3 files changed

+95
-10
lines changed

.github/workflows/manual-release.yml

Lines changed: 91 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,60 @@ jobs:
6363
echo "cargo-release already installed"
6464
fi
6565
66+
- name: Verify crates.io authentication
67+
if: ${{ !inputs.dry_run }}
68+
env:
69+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
70+
run: |
71+
echo "Verifying crates.io authentication..."
72+
73+
# Check if token is set (don't print it!)
74+
if [ -z "$CARGO_REGISTRY_TOKEN" ]; then
75+
echo "::error::CARGO_REGISTRY_TOKEN is not set!"
76+
exit 1
77+
fi
78+
79+
# Show token metadata (length and first few chars only for debugging)
80+
TOKEN_LENGTH=${#CARGO_REGISTRY_TOKEN}
81+
echo "Token is set (length: $TOKEN_LENGTH)"
82+
83+
# Verify token format (should start with specific prefix)
84+
if [[ ! "$CARGO_REGISTRY_TOKEN" =~ ^[a-zA-Z0-9_-]{20,} ]]; then
85+
echo "::warning::Token format may be invalid"
86+
fi
87+
88+
# Test authentication with cargo
89+
echo "Testing cargo login..."
90+
cargo login "$CARGO_REGISTRY_TOKEN"
91+
92+
# Test with dry-run publish on smallest package
93+
echo "Testing publish access with dry-run..."
94+
cd crates/redis-cloud
95+
if cargo publish --dry-run 2>&1 | tee /tmp/publish-test.log; then
96+
echo "✓ Successfully authenticated to crates.io"
97+
else
98+
echo "::error::Failed to authenticate to crates.io"
99+
echo "Debug output:"
100+
cat /tmp/publish-test.log
101+
exit 1
102+
fi
103+
cd ../..
104+
105+
# Verify all packages can be published
106+
echo "Verifying all packages..."
107+
for pkg in redis-cloud redis-enterprise redisctl; do
108+
echo " Checking $pkg..."
109+
cd crates/$pkg
110+
if ! cargo publish --dry-run --allow-dirty > /dev/null 2>&1; then
111+
echo "::error::Package $pkg cannot be published"
112+
cargo publish --dry-run --allow-dirty
113+
exit 1
114+
fi
115+
cd ../..
116+
done
117+
118+
echo "✓ All packages verified for publishing"
119+
66120
- name: Dry Run Release
67121
if: inputs.dry_run
68122
run: |
@@ -77,18 +131,49 @@ jobs:
77131
env:
78132
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
79133
CARGO_TERM_COLOR: always
80-
RUST_BACKTRACE: 1
134+
RUST_BACKTRACE: full
135+
RUST_LOG: cargo_release=debug
81136
run: |
82137
echo "Releasing ${{ inputs.version }} version..."
83138
139+
# Debug: Show current state
140+
echo "Current directory: $(pwd)"
141+
echo "Git status:"
142+
git status
143+
echo ""
144+
145+
# Debug: Show what cargo-release will do
146+
echo "Checking what cargo-release will do..."
147+
cargo release ${{ inputs.version }} --list 2>&1 | tee /tmp/release-list.log || true
148+
149+
if ! grep -q "redis-cloud\|redis-enterprise\|redisctl" /tmp/release-list.log; then
150+
echo "::warning::No packages detected by cargo-release. Debug info:"
151+
echo "Workspace members:"
152+
cargo metadata --no-deps --format-version 1 | jq -r '.workspace_members[]'
153+
echo ""
154+
echo "Package metadata:"
155+
for pkg in redis-cloud redis-enterprise redisctl; do
156+
echo "Package: $pkg"
157+
cargo metadata --no-deps --format-version 1 | jq ".packages[] | select(.name == \"$pkg\") | {name, version, publish}"
158+
done
159+
fi
160+
84161
# Run cargo-release - it will handle everything
85-
# Explicitly specify all packages to release
162+
# Use workspace-level release with shared-version
163+
echo "Executing release..."
86164
cargo release ${{ inputs.version }} \
87-
--package redis-cloud \
88-
--package redis-enterprise \
89-
--package redisctl \
90-
--execute --no-confirm --verbose || {
165+
--execute --no-confirm --verbose 2>&1 | tee /tmp/release.log || {
91166
echo "::error::cargo-release failed. Check the logs above for details."
167+
echo ""
168+
echo "Failure analysis:"
169+
if grep -q "no packages selected" /tmp/release.log; then
170+
echo "- cargo-release couldn't find packages to release"
171+
echo "- This usually means a configuration or authentication issue"
172+
fi
173+
if grep -q "failed to connect" /tmp/release.log; then
174+
echo "- Network/authentication issue detected"
175+
echo "- Verify CARGO_REGISTRY_TOKEN is valid"
176+
fi
92177
exit 1
93178
}
94179

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ default-members = [
1212
]
1313

1414
[workspace.package]
15-
version = "0.3.1"
15+
version = "0.3.2"
1616
edition = "2024"
1717
rust-version = "1.89"
1818
authors = ["Josh Rotenberg <[email protected]>"]

0 commit comments

Comments
 (0)