@@ -335,41 +335,6 @@ jobs:
335335 Get-Content $ChecksumFile
336336 echo "::endgroup::"
337337
338- - name : Create GitHub Release
339- shell : pwsh
340- env :
341- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
342- working-directory : output
343- run : |
344- $PackageVersion = '${{ needs.preflight.outputs.package-version }}'
345- $DraftRelease = [System.Boolean]::Parse('${{ needs.preflight.outputs.draft-release }}')
346- $DryRun = [System.Boolean]::Parse('${{ needs.preflight.outputs.dry-run }}')
347-
348- echo "::group::checksums"
349- Get-Content "./checksums.txt"
350- echo "::endgroup::"
351-
352- $ReleaseTag = "v$PackageVersion"
353- $ReleaseTitle = "UniGetUI v${PackageVersion}"
354- $Repository = $Env:GITHUB_REPOSITORY
355- $DraftArg = if ($DraftRelease) { '--draft' } else { $null }
356-
357- $Files = Get-ChildItem -Path . -Recurse -File | Where-Object {
358- $_.Name -eq 'checksums.txt' -or $_.Name -notmatch '^checksums\..+\.txt$'
359- }
360-
361- if ($DryRun) {
362- Write-Host "Dry Run: skipping GitHub release creation!"
363- Write-Host "Would create release $ReleaseTag with title '$ReleaseTitle' (draft=$DraftRelease)"
364- $Files | ForEach-Object { Write-Host " - $($_.FullName)" }
365- } else {
366- if ($DraftArg) {
367- & gh release create $ReleaseTag --repo $Repository --title $ReleaseTitle $DraftArg $Files.FullName
368- } else {
369- & gh release create $ReleaseTag --repo $Repository --title $ReleaseTitle $Files.FullName
370- }
371- }
372-
373338 - name : Check out Devolutions/actions
374339 if : ${{ fromJSON(needs.preflight.outputs.dry-run) == false }}
375340 uses : actions/checkout@v4
0 commit comments