File tree Expand file tree Collapse file tree 6 files changed +66
-6
lines changed Expand file tree Collapse file tree 6 files changed +66
-6
lines changed Original file line number Diff line number Diff line change 1515
1616jobs :
1717 test :
18+ name : test ${{ matrix.channel }}-${{ matrix.target }}
1819 runs-on : ${{ matrix.os }}
1920 steps :
2021 - uses : actions/checkout@v4
4647 log-level : warn
4748 command : check
4849 arguments : --all-features
50+ - name : Build Docs
51+ uses : actions-rs/cargo@v1
52+ with :
53+ command : doc
54+ args : --all
4955 - name : Run tests
5056 env :
5157 CHANNEL : ${{ matrix.channel }}
Original file line number Diff line number Diff line change 1+ name : Release Crates
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ pull_request :
8+ branches :
9+ - master
10+ paths :
11+ - " .github/workflows/release.yml"
12+ workflow_dispatch :
13+
14+ env :
15+ CARGO_TERM_COLOR : always
16+
17+ jobs :
18+ publish :
19+ runs-on : ubuntu-latest
20+ strategy :
21+ # Publish package one by one instead of flooding the registry
22+ max-parallel : 1
23+ matrix :
24+ # Order here is sensitive, as it will be used to determine the order of publishing
25+ package :
26+ - " core"
27+ - " hook"
28+ - " macros"
29+ - " open-coroutine"
30+ steps :
31+ - uses : actions/checkout@v4
32+ - name : Setup Rust toolchain
33+ uses : actions-rs/toolchain@v1
34+ with :
35+ toolchain : stable
36+ - name : Dryrun ${{ matrix.package }}
37+ working-directory : ${{ matrix.package }}
38+ run : cargo publish --dry-run
39+ - name : Publish ${{ matrix.package }}
40+ working-directory : ${{ matrix.package }}
41+ # Only publish if it's a tag and the tag is not a pre-release
42+ if : ${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') }}
43+ run : cargo publish
44+ env :
45+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ members = [
88]
99
1010[workspace .package ]
11- version = " 0.6.14 "
11+ version = " 0.6.15 "
1212edition = " 2021"
13131414repository = " https://github.com/acl-dev/open-coroutine"
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ fn main() {
136136}
137137```
138138
139- ## 🪽 Advanced Usage
139+ ## 👊 Advanced Usage
140140
141141### create a task with priority
142142
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ fn main() {
132132}
133133```
134134
135- ## 🪽 进阶使用
135+ ## 👊 进阶使用
136136
137137### 创建具有优先级的任务
138138
Original file line number Diff line number Diff line change @@ -81,9 +81,7 @@ fn main() {
8181 ) ;
8282 let crates_parent = if crates_parent_dirs. len ( ) == 1 {
8383 crates_parent_dirs. first ( ) . expect ( "host dir not found" )
84- } else {
85- let rustup_dist_server =
86- var ( "RUSTUP_DIST_SERVER" ) . expect ( "RUSTUP_DIST_SERVER not found" ) ;
84+ } else if let Ok ( rustup_dist_server) = var ( "RUSTUP_DIST_SERVER" ) {
8785 let host = rustup_dist_server
8886 . split ( "://" )
8987 . last ( )
@@ -109,6 +107,17 @@ fn main() {
109107 } )
110108 . expect ( "host dir not found" )
111109 } )
110+ } else {
111+ crates_parent_dirs
112+ . iter ( )
113+ . find ( |entry| {
114+ entry
115+ . file_name ( )
116+ . to_string_lossy ( )
117+ . to_string ( )
118+ . contains ( "crates.io" )
119+ } )
120+ . expect ( "host dir not found" )
112121 }
113122 . file_name ( )
114123 . to_string_lossy ( )
You can’t perform that action at this time.
0 commit comments