Skip to content

Commit 161bac9

Browse files
committedMar 3, 2025
Fix GitHub release workflow in dispatched runs
Dispatched runs were failing because they still looked for a GitHub release via properties that are not defined. Also, upload artifacts to the GitHub release recursively, avoiding directories.
1 parent 0fb1dde commit 161bac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ jobs:
7474

7575
- name: 💽 Upload artifacts to release
7676
shell: pwsh
77-
if: ${{ github.event.release.assets_url }} != ''
77+
if: ${{ github.event_name == 'release' && github.event.release.assets_url != '' }}
7878
env:
7979
GH_TOKEN: ${{ github.token }}
8080
run: |
81-
Get-ChildItem '${{ runner.temp }}/deployables' |% {
81+
Get-ChildItem '${{ runner.temp }}/deployables' -File -Recurse |% {
8282
Write-Host "Uploading $($_.Name) to release..."
8383
gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName
8484
}

0 commit comments

Comments
 (0)
Failed to load comments.