File tree Expand file tree Collapse file tree 2 files changed +57
-1
lines changed
Expand file tree Collapse file tree 2 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ permissions :
4+ contents : read
5+
6+ on :
7+ workflow_dispatch :
8+
9+ defaults :
10+ run :
11+ shell : bash
12+
13+ jobs :
14+ run-ci :
15+ uses : ./.github/workflows/rust.yml
16+
17+ publish-crate :
18+ name : Publish crate
19+ runs-on : ubuntu-latest
20+ needs : run-ci
21+ steps :
22+ - name : Install stable toolchain
23+ uses : dtolnay/rust-toolchain@stable
24+ with :
25+ toolchain : stable
26+
27+ - name : Checkout sources
28+ uses : actions/checkout@v5
29+ with :
30+ submodules : recursive
31+
32+ - name : Publish crate
33+ env :
34+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
35+ run : |
36+ cd librocksdb-sys
37+ cargo publish
38+
39+ - name : Wait for crates.io to index the package
40+ run : |
41+ echo "Waiting for surrealdb-librocksdb-sys to be available on crates.io..."
42+ for i in {1..30}; do
43+ if cargo search surrealdb-librocksdb-sys | grep -q "surrealdb-librocksdb-sys"; then
44+ echo "Package found on crates.io!"
45+ exit 0
46+ fi
47+ echo "Attempt $i/30: Package not yet available, waiting 10 seconds..."
48+ sleep 10
49+ done
50+ echo "ERROR: Package still not available after 5 minutes"
51+ exit 1
52+
53+ - name : Publish main crate
54+ env :
55+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
56+ run : cargo publish
Original file line number Diff line number Diff line change 11name : RocksDB CI
22
3- on : [ push, pull_request ]
3+ on : [ push, pull_request, workflow_call ]
44env :
55 RUST_VERSION : 1.85.0
66 CARGO_TERM_COLOR : always
You can’t perform that action at this time.
0 commit comments