Skip to content

Commit d53d356

Browse files
committed
fix publish
1 parent c228761 commit d53d356

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/upload_crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- name: Set version
1919
run: |
20-
echo "current ref ${{ github.ref }}""
20+
echo "current ref ${{ github.ref }}"
2121
cargo run -p edit_version -- ${{ github.ref }}
2222
- name: Publish
2323
run: |

tools/edit_version/src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ const CARGOS: &[&str] = &[
88
];
99

1010
fn main() {
11-
let version = std::env::args().nth(1).expect("Please provide a version");
11+
let mut version = std::env::args().nth(1).expect("Please provide a version");
12+
if version.starts_with("refs/tags/") {
13+
version = version.replace("refs/tags/", "");
14+
}
15+
1216
let current_dir = std::env::current_dir().unwrap();
1317
// 向上查找到有crates的目录
1418
let workspace_dir = current_dir

0 commit comments

Comments
 (0)