Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mazznoer committed Aug 22, 2024
1 parent 3c90e6f commit 41feb8c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
CARGO_TERM_COLOR: always
OUT_DIR: .
OUT_DIR: target

jobs:
build:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
tags:
- v[0-9]+.*

env:
OUT_DIR: target

jobs:
upload-assets:
strategy:
Expand All @@ -31,6 +34,10 @@ jobs:
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# create dir
leading-dir: true
# additional files
include: target/completions
env:
# (required)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() -> Result<(), clap::Error> {
use clap_complete::{generate_to, Shell};
use std::{env, fs, path};

let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR not set");
let out_dir = env!("OUT_DIR");
let dir = path::Path::new(&out_dir).join("completions/");
if !dir.exists() {
fs::create_dir(dir.clone()).expect("Failed to create 'completions' directory.");
Expand Down

0 comments on commit 41feb8c

Please sign in to comment.