From 6cc2a4180b541f12c88c6656b1bb60ef753975b4 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 5 Jan 2024 15:39:19 +0800 Subject: [PATCH] action --- .github/workflows/rust.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cc91a5b..08e205c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -55,10 +55,17 @@ jobs: --draft shell: bash - # Upload the built artifact to the release + - name: Prepare asset name + id: prep + run: | + echo "ASSET_NAME=ncbi$(if [ ${{ runner.os }} = 'Windows' ]; then echo '.exe'; fi)" >> $GITHUB_ENV + shell: bash + - name: Upload Release Asset run: | gh release upload ${{ github.ref_name }} \ - ./target/release/ncbi \ + ./target/release/${{ env.ASSET_NAME }} \ --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash