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 13f5821 commit ced3e3a
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 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: matrix.os != 'windows-latest' && (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push')
if: github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push'
shell: bash
run: |
IFS=',' read -ra ASSETS <<< "${{ env.ASSET }}"
Expand All @@ -266,18 +266,4 @@ jobs:
-H "Content-Type: $(file -b --mime-type $ASSET)" \
--data-binary @"$ASSET" \
"${{ needs.create-release.outputs.upload_url }}=$ASSET_NAME"
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 }}?name=$ASSET_NAME"
$command = 'curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: multipart/form-data" --data-binary "@' + $ASSET + '" ' + $uploadUrl
Invoke-Expression $command
}
done

0 comments on commit ced3e3a

Please sign in to comment.