File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,15 +70,20 @@ jobs:
7070 id : notes
7171 shell : pwsh
7272 run : |
73+ $file = "$PWD\release_notes.txt"
74+
7375 if ($env:latest_tag -eq "v0.0") {
74- $commits = git log --pretty=format:"* %s (%h)"
76+ git log --pretty=format:"* %s (%h)" > $file
7577 } else {
76- $commits = git log $env:latest_tag..HEAD --pretty=format:"* %s (%h)"
78+ git log $env:latest_tag..HEAD --pretty=format:"* %s (%h)" > $file
79+ }
80+
81+ if ((Get-Content $file).Length -eq 0) {
82+ Set-Content -Path $file -Value "Initial release"
7783 }
78- if (-not $commits) { $commits = "Initial release" }
79- # Force newlines
80- $commits = $commits -replace "`r?`n", "`n"
81- echo "notes=$commits" >> $env:GITHUB_ENV
84+
85+ echo "RELEASE_NOTES_FILE=$file" >> $env:GITHUB_ENV
86+
8287
8388 - name : Rename EXE to include version
8489 shell : pwsh
@@ -101,7 +106,8 @@ jobs:
101106 with :
102107 tag_name : v${{ env.version }}
103108 name : " Sysprep Preparator v${{ env.version }}"
104- body : ${{ env.notes }}
109+ body_path : ${{ env.RELEASE_NOTES_FILE }}
105110 files : ${{ env.EXE_PATH }}
106111 env :
107112 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113+
You can’t perform that action at this time.
0 commit comments