Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed Apr 25, 2024
1 parent 8e5eb0a commit 6c8b7b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/scripts/upload_gh_assets.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
IFS=',' read -ra ASSETS <<< "$2"
url="$1"
url=${url%%\{*}
for ASSET in "${ASSETS[@]}"; do
ASSET_NAME=$(basename $ASSET)
curl \
-H "Authorization: Bearer $0" \
-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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 6c8b7b1

Please sign in to comment.