From bee28c1939cc3caed68c7d7988ed1971de556ca0 Mon Sep 17 00:00:00 2001 From: Ioannis Tsiakkas Date: Sat, 24 Feb 2024 14:53:15 +0200 Subject: [PATCH] Upload files to assets --- .github/workflows/go.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2a35cce..6ecfc03 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -46,7 +46,6 @@ jobs: with: name: mediarizer2-${{ matrix.OS }}-${{ matrix.ARCH }}.${{ matrix.EXT }} path: mediarizer2-${{ matrix.OS }}-${{ matrix.ARCH }}.${{ matrix.EXT }} - - name: Upload Release Asset uses: actions/upload-release-asset@v1 env: @@ -102,7 +101,18 @@ jobs: run: | for file in mediarizer2-*; do echo "Uploading $file" + asset_path="$file" asset_name=$(basename $file) echo "Asset Name: $asset_name" - curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$file ${{ steps.create_release.outputs.upload_url }}?name=$asset_name - done \ No newline at end of file + curl \ + -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary "@$asset_path" \ + "${{ steps.create_release.outputs.upload_url }}?name=$(urlencode $asset_name)" + done + # echo "Uploading $file" + # asset_name=$(basename $file) + # echo "Asset Name: $asset_name" + # curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$file ${{ steps.create_release.outputs.upload_url }}?name=$asset_name + # done \ No newline at end of file