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 a072084 commit bb36995
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 10 additions & 0 deletions .github/scripts/upload_gh_assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
IFS=',' read -ra ASSETS <<< "${{ env.ASSET }}"
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"
done
14 changes: 2 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,5 @@ jobs:
- name: Upload release archives
if: github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push'
shell: bash
run: |
pwd
IFS=',' read -ra ASSETS <<< "${{ env.ASSET }}"
for ASSET in "${ASSETS[@]}"; do
ASSET_NAME=$(basename $ASSET)
curl \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: $(file -b --mime-type $ASSET)" \
-H "X-GitHub-Api-Version: 2022-11-28" \
--data-binary @"$ASSET" \
"${{ needs.create-release.outputs.upload_url }}=$ASSET_NAME"
done
run: .github/scripts/upload_gh_assets.sh ${{ secrets.GITHUB_TOKEN }} ${{ needs.create-release.outputs.upload_url }}

0 comments on commit bb36995

Please sign in to comment.