From 6c8b7b1f9f7f04d919a2a7aab376c90160f295ec Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Thu, 25 Apr 2024 15:09:28 +0200 Subject: [PATCH] test --- .github/scripts/upload_gh_assets.sh | 4 +++- .github/workflows/release.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/upload_gh_assets.sh b/.github/scripts/upload_gh_assets.sh index e4430d3cf0..8bab235f1e 100755 --- a/.github/scripts/upload_gh_assets.sh +++ b/.github/scripts/upload_gh_assets.sh @@ -1,4 +1,6 @@ IFS=',' read -ra ASSETS <<< "$2" +url="$1" +url=${url%%\{*} for ASSET in "${ASSETS[@]}"; do ASSET_NAME=$(basename $ASSET) curl \ @@ -6,5 +8,5 @@ for ASSET in "${ASSETS[@]}"; do -H "Content-Type: $(file -b --mime-type $ASSET)" \ -H "X-GitHub-Api-Version: 2022-11-28" \ --data-binary @"$ASSET" \ - "$1=$ASSET_NAME" + "$url?name=$ASSET_NAME" done \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0bb4cf897..b38519950b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -257,7 +257,7 @@ jobs: - name: Upload release archives if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os != 'windows-latest' shell: bash - run: .github/scripts/upload_gh_assets.sh ${{ secrets.GITHUB_TOKEN }} ${{ needs.create-release.outputs.upload_url }} + run: .github/scripts/upload_gh_assets.sh ${{ secrets.GITHUB_TOKEN }} ${{ needs.create-release.outputs.upload_url }} ${{ env.ASSET }} - name: Upload release archives (windows) if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest'