Skip to content

Commit

Permalink
Upload files to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
keybraker committed Feb 24, 2024
1 parent 1c1d8f6 commit bee28c1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
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

0 comments on commit bee28c1

Please sign in to comment.