Skip to content

ci: fix the release workflow #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2024
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
13 changes: 2 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,7 @@ jobs:

- id: build
run: |
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

export HOST=$(rustc -vV | grep host: | awk '{print $2}')
if [ "$HOST" = "$TARGET" ]; then
cargo build --release --target ${TARGET}
else
Expand All @@ -100,9 +92,8 @@ jobs:
tar cvzf $ASSET_NAME xsnippet-api
fi
gh release upload $RELEASE_TAG $ASSET_NAME
popd

echo "asset_path=$PWD/$ASSET_NAME" >> $GITHUB_OUTPUT
popd
env:
ASSET_NAME: ${{ matrix.name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading