Fixup Rust CI
This commit is contained in:
parent
87ece24160
commit
ec02eccb85
4
.github/workflows/Crate-publishing.yml
vendored
4
.github/workflows/Crate-publishing.yml
vendored
@ -70,7 +70,7 @@ jobs:
|
||||
- name: '🚧 Cargo test'
|
||||
if: "!startsWith(github.ref, 'refs/tags')"
|
||||
env:
|
||||
UNICORN_VERSION: dev
|
||||
CI: ci
|
||||
run: |
|
||||
cd bindings/rust && cargo test
|
||||
|
||||
@ -78,6 +78,6 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags') && contains(matrix.config.os, 'ubuntu')
|
||||
env:
|
||||
TOKEN: ${{ secrets.cratesio_token }}
|
||||
UNICORN_VERSION: dev
|
||||
CI: ci
|
||||
run: |
|
||||
cd bindings/rust && cargo login $TOKEN && cargo test && cargo publish
|
@ -52,7 +52,12 @@ fn download_unicorn() -> Option<String> {
|
||||
fn main() {
|
||||
let profile = env::var("PROFILE").unwrap();
|
||||
|
||||
let unicorn_dir = download_unicorn().unwrap();
|
||||
let unicorn_dir;
|
||||
if let Result::Ok(_) = env::var("CI") {
|
||||
unicorn_dir = format!("../..");
|
||||
} else {
|
||||
unicorn_dir = download_unicorn().unwrap();
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-changed={}", &unicorn_dir);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user