Skip to content

Commit 6ec517a

Browse files
authored
Merge pull request #176 from xsnippet/ci2
ci: fix the release workflow
2 parents 5b804f7 + 61a18b4 commit 6ec517a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/release.yml

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

7878
- id: build
7979
run: |
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-
80+
export HOST=$(rustc -vV | grep host: | awk '{print $2}')
8981
if [ "$HOST" = "$TARGET" ]; then
9082
cargo build --release --target ${TARGET}
9183
else
@@ -100,9 +92,8 @@ jobs:
10092
tar cvzf $ASSET_NAME xsnippet-api
10193
fi
10294
gh release upload $RELEASE_TAG $ASSET_NAME
103-
popd
104-
10595
echo "asset_path=$PWD/$ASSET_NAME" >> $GITHUB_OUTPUT
96+
popd
10697
env:
10798
ASSET_NAME: ${{ matrix.name }}
10899
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)