Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ jobs:

- id: build
run: |
export HOST=$(rustc +nightly -Z unstable-options --print target-spec-json | jq --raw-output '."llvm-target"')
rustc --print cfg | grep = > rustc.vars
source rustc.vars

if [ -z "${target_env}" ]; then
export HOST="${target_arch}-${target_vendor}-${target_os}"
else
export HOST="${target_arch}-${target_vendor}-${target_os}-${target_env}"
fi

if [ "$HOST" = "$TARGET" ]; then
cargo build --release --target ${TARGET}
else
Expand All @@ -86,7 +94,7 @@ jobs:
fi

pushd target/${TARGET}/release
if [ "$TARGET" =~ "windows" ]; then
if [[ "$TARGET" =~ "windows" ]]; then
7z a $ASSET_NAME xsnippet-api.exe
else
tar cvzf $ASSET_NAME xsnippet-api
Expand Down
Loading