Skip to content

Commit 70dbe84

Browse files
chore: pre-release cleanup for v0.5.0 (#310)
* chore: cleanup for v0.5.0 release - Remove ENTERPRISE_AUDIT.md - temporary tracking file no longer needed - Remove cliff.toml - not integrated in current release workflow - Update CLAUDE.md to document actual release process (manual or script) - Clarify that releases are currently done manually with PR + tag - Document scripts/release.sh as alternative automated approach * docs: add comprehensive documentation for new enterprise commands - Add documentation for bootstrap commands (cluster initialization) - Add documentation for debug-info commands (diagnostics collection) - Add documentation for LDAP integration commands - Add documentation for OCSP certificate validation commands - Add documentation for service management commands - Update SUMMARY.md to include all new documentation pages - Update CLAUDE.md to enforce documentation requirements for all new features This ensures PR #309's new commands are fully documented and establishes a clear requirement that all future commands must include documentation. * chore: simplify crates.io publishing workflow and remove manual release scripts - Simplified publish-crates.yml to trigger on GitHub release publication - Removed release.sh and test-release.sh scripts - Updated CLAUDE.md with clear 3-step release process - Workflow now publishes crates in dependency order automatically - Sets up for future automation with release-plz
1 parent 3918be6 commit 70dbe84

File tree

11 files changed

+1123
-551
lines changed

11 files changed

+1123
-551
lines changed
Lines changed: 24 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,51 @@
11
name: Publish to crates.io
22

33
on:
4-
workflow_run:
5-
workflows: ["Release"]
6-
types:
7-
- completed
8-
workflow_dispatch:
9-
inputs:
10-
dry-run:
11-
description: "Dry run (do not actually publish)"
12-
required: false
13-
default: false
14-
type: boolean
4+
release:
5+
types: [published]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
159

1610
jobs:
1711
publish:
1812
name: Publish to crates.io
1913
runs-on: ubuntu-latest
20-
# Only run if the release workflow succeeded or this was manually triggered
21-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
22-
2314
steps:
2415
- name: Checkout repository
2516
uses: actions/checkout@v4
26-
with:
27-
# Fetch the tag that triggered the release
28-
fetch-depth: 0
29-
30-
- name: Get version from tag
31-
id: get-version
32-
run: |
33-
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
34-
# For manual runs, use the latest tag
35-
VERSION=$(git describe --tags --abbrev=0 || echo "v0.0.0")
36-
else
37-
# For workflow_run, get the tag from the triggering workflow
38-
VERSION="${{ github.event.workflow_run.head_branch }}"
39-
fi
40-
echo "version=${VERSION#v}" >> $GITHUB_OUTPUT
41-
echo "Publishing version: ${VERSION#v}"
4217

43-
- name: Install Rust
18+
- name: Setup Rust
4419
uses: dtolnay/rust-toolchain@stable
4520

4621
- name: Cache cargo
4722
uses: Swatinem/rust-cache@v2
4823

49-
- name: Install cargo-workspaces
50-
run: cargo install cargo-workspaces
51-
52-
- name: Check which crates need publishing
53-
id: check-crates
54-
run: |
55-
echo "Checking which crates need to be published..."
56-
57-
# Check each crate to see if it's already published
58-
NEEDS_PUBLISH=""
59-
60-
for crate in redis-cloud redis-enterprise redisctl; do
61-
CRATE_VERSION=$(grep "^version" crates/$crate/Cargo.toml | sed 's/.*= *"\(.*\)"/\1/')
62-
echo "Checking $crate v$CRATE_VERSION..."
63-
64-
# Check if this version is already on crates.io
65-
# Capture both stdout and stderr, ignore stderr output (the "note:" lines)
66-
SEARCH_OUTPUT=$(cargo search "$crate" --limit 1 2>/dev/null || true)
67-
68-
# Check if the exact version is found
69-
if echo "$SEARCH_OUTPUT" | grep -q "^${crate} = \"${CRATE_VERSION}\""; then
70-
echo " ✓ $crate v$CRATE_VERSION is already published"
71-
else
72-
echo " → $crate v$CRATE_VERSION needs publishing"
73-
echo " Search output was: $SEARCH_OUTPUT"
74-
NEEDS_PUBLISH="$NEEDS_PUBLISH $crate"
75-
fi
76-
done
77-
78-
echo "needs_publish=$NEEDS_PUBLISH" >> $GITHUB_OUTPUT
79-
80-
if [ -z "$NEEDS_PUBLISH" ]; then
81-
echo "All crates are already published!"
82-
else
83-
echo "Crates to publish:$NEEDS_PUBLISH"
84-
fi
24+
- name: Cache cargo dependencies
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cargo/bin/
29+
~/.cargo/registry/index/
30+
~/.cargo/registry/cache/
31+
~/.cargo/git/db/
32+
target/
33+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
8534

8635
- name: Publish redis-cloud
87-
if: contains(steps.check-crates.outputs.needs_publish, 'redis-cloud')
88-
env:
89-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
90-
run: |
91-
if [[ "${{ inputs.dry-run }}" == "true" ]]; then
92-
echo "DRY RUN: Would publish redis-cloud"
93-
cd crates/redis-cloud && cargo publish --dry-run
94-
else
95-
echo "Publishing redis-cloud..."
96-
cd crates/redis-cloud && cargo publish --no-verify
97-
fi
36+
run: cargo publish --package redis-cloud --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
37+
continue-on-error: true # Allow failure if already published
9838

9939
- name: Wait for redis-cloud to be available
100-
if: contains(steps.check-crates.outputs.needs_publish, 'redis-cloud')
101-
run: |
102-
if [[ "${{ inputs.dry-run }}" != "true" ]]; then
103-
echo "Waiting for redis-cloud to be available on crates.io..."
104-
sleep 30
105-
fi
40+
run: sleep 30
10641

10742
- name: Publish redis-enterprise
108-
if: contains(steps.check-crates.outputs.needs_publish, 'redis-enterprise')
109-
env:
110-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
111-
run: |
112-
if [[ "${{ inputs.dry-run }}" == "true" ]]; then
113-
echo "DRY RUN: Would publish redis-enterprise"
114-
cd crates/redis-enterprise && cargo publish --dry-run
115-
else
116-
echo "Publishing redis-enterprise..."
117-
cd crates/redis-enterprise && cargo publish --no-verify
118-
fi
43+
run: cargo publish --package redis-enterprise --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
44+
continue-on-error: true # Allow failure if already published
11945

12046
- name: Wait for redis-enterprise to be available
121-
if: contains(steps.check-crates.outputs.needs_publish, 'redis-enterprise')
122-
run: |
123-
if [[ "${{ inputs.dry-run }}" != "true" ]]; then
124-
echo "Waiting for redis-enterprise to be available on crates.io..."
125-
sleep 30
126-
fi
47+
run: sleep 30
12748

12849
- name: Publish redisctl
129-
if: contains(steps.check-crates.outputs.needs_publish, 'redisctl')
130-
env:
131-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
132-
run: |
133-
if [[ "${{ inputs.dry-run }}" == "true" ]]; then
134-
echo "DRY RUN: Would publish redisctl"
135-
cd crates/redisctl && cargo publish --dry-run
136-
else
137-
echo "Publishing redisctl..."
138-
cd crates/redisctl && cargo publish --no-verify
139-
fi
140-
141-
- name: Verify publication
142-
if: ${{ inputs.dry-run != true && steps.check-crates.outputs.needs_publish != '' }}
143-
run: |
144-
echo "Waiting for crates to be fully available..."
145-
sleep 60
146-
147-
echo "Verifying all crates are published:"
148-
for crate in redis-cloud redis-enterprise redisctl; do
149-
CRATE_VERSION=$(grep "^version" crates/$crate/Cargo.toml | sed 's/.*= *"\(.*\)"/\1/')
150-
echo -n "Checking $crate v$CRATE_VERSION... "
151-
152-
SEARCH_OUTPUT=$(cargo search "$crate" --limit 1 2>/dev/null || true)
153-
if echo "$SEARCH_OUTPUT" | grep -q "^${crate} = \"${CRATE_VERSION}\""; then
154-
echo "✓ Published!"
155-
else
156-
echo "✗ Not found!"
157-
echo "Search output: $SEARCH_OUTPUT"
158-
exit 1
159-
fi
160-
done
161-
162-
echo ""
163-
echo "All crates successfully published to crates.io!"
164-
echo ""
165-
echo "View them at:"
166-
echo " - https://crates.io/crates/redis-cloud"
167-
echo " - https://crates.io/crates/redis-enterprise"
168-
echo " - https://crates.io/crates/redisctl"
50+
run: cargo publish --package redisctl --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
51+
continue-on-error: true # Allow failure if already published

ENTERPRISE_AUDIT.md

Lines changed: 0 additions & 71 deletions
This file was deleted.

cliff.toml

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/src/SUMMARY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
- [Overview](./enterprise/overview.md)
3030
- [Cluster](./enterprise/cluster.md)
31+
- [Bootstrap](./enterprise/bootstrap.md)
3132
- [CM Settings](./enterprise/cm-settings.md)
3233
- [Databases](./enterprise/databases.md)
3334
- [Database Groups](./enterprise/bdb-groups.md)
@@ -44,11 +45,15 @@
4445
- [CRDB Tasks](./enterprise/crdb-tasks.md)
4546
- [Actions (Tasks)](./enterprise/actions.md)
4647
- [Alerts](./enterprise/alerts.md)
48+
- [Debug Info](./enterprise/debuginfo.md)
4749
- [Diagnostics](./enterprise/diagnostics.md)
4850
- [Endpoints](./enterprise/endpoints.md)
4951
- [Job Scheduler](./enterprise/job-scheduler.md)
5052
- [JSON Schema](./enterprise/jsonschema.md)
53+
- [LDAP Integration](./enterprise/ldap.md)
5154
- [License Management](./enterprise/license.md)
55+
- [OCSP Validation](./enterprise/ocsp.md)
56+
- [Service Management](./enterprise/services.md)
5257
- [DNS Suffixes](./enterprise/suffix.md)
5358
- [Workflows](./enterprise/workflows.md)
5459
- [Raw API Access](./enterprise/api-access.md)

0 commit comments

Comments
 (0)