Skip to content

Commit 5b804f7

Browse files
authored
Merge pull request #174 from xsnippet/ci
ci: quick fix for the releases workflow
2 parents 4e0c11a + a7b2a42 commit 5b804f7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/release.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,15 @@ jobs:
7777

7878
- id: build
7979
run: |
80-
export HOST=$(rustc +nightly -Z unstable-options --print target-spec-json | jq --raw-output '."llvm-target"')
80+
rustc --print cfg | grep = > rustc.vars
81+
source rustc.vars
82+
83+
if [ -z "${target_env}" ]; then
84+
export HOST="${target_arch}-${target_vendor}-${target_os}"
85+
else
86+
export HOST="${target_arch}-${target_vendor}-${target_os}-${target_env}"
87+
fi
88+
8189
if [ "$HOST" = "$TARGET" ]; then
8290
cargo build --release --target ${TARGET}
8391
else
@@ -86,7 +94,7 @@ jobs:
8694
fi
8795
8896
pushd target/${TARGET}/release
89-
if [ "$TARGET" =~ "windows" ]; then
97+
if [[ "$TARGET" =~ "windows" ]]; then
9098
7z a $ASSET_NAME xsnippet-api.exe
9199
else
92100
tar cvzf $ASSET_NAME xsnippet-api

0 commit comments

Comments
 (0)