Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed Apr 24, 2024
1 parent ced3e3a commit 269d26e
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ jobs:
run: sudo apt update && sudo apt install -y file

- name: Upload release archives
if: github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push'
if: matrix.os != 'windows-latest' && (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push')
shell: bash
run: |
IFS=',' read -ra ASSETS <<< "${{ env.ASSET }}"
Expand All @@ -266,4 +266,18 @@ jobs:
-H "Content-Type: $(file -b --mime-type $ASSET)" \
--data-binary @"$ASSET" \
"${{ needs.create-release.outputs.upload_url }}=$ASSET_NAME"
done
done
- name: Upload release archives
if: matrix.os == 'windows-latest' && (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push')
shell: pwsh
run: |
$ASSETS = "${{ env.ASSET }}".Split(',')
foreach ($ASSET in $ASSETS) {
$ASSET_NAME = Split-Path $ASSET -Leaf
$uploadUrl = "${{ needs.create-release.outputs.upload_url }}=$ASSET_NAME"
$command = 'curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: multipart/form-data" --data-binary "@' + $ASSET + '" ' + $uploadUrl
Invoke-Expression $command
}

0 comments on commit 269d26e

Please sign in to comment.