Skip to content

Commit a1e51bf

Browse files
committed
Refactor checksum handling in release workflow
Removes the separate checksums.txt file and appends the SHA256 checksum directly to release_notes.md. Updates artifact and release steps to exclude checksums.txt, simplifying the release process.
1 parent 83380e5 commit a1e51bf

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/build-release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,22 @@ jobs:
108108
109109
Write-Host "Release notes generated successfully"
110110
111-
- name: Calculate checksums
111+
- name: Calculate checksum
112112
shell: pwsh
113113
run: |
114114
# Calculate SHA256 for the exe
115115
$exeHash = (Get-FileHash -Path "./FFmpegInstaller.exe" -Algorithm SHA256).Hash
116116
Write-Host "FFmpegInstaller.exe SHA256: $exeHash"
117117
118-
# Save checksums to file
118+
# Append to release notes
119119
@"
120-
# SHA256 Checksum
120+
121+
## SHA256 Checksum
121122
122123
``````
123124
$exeHash FFmpegInstaller.exe
124125
``````
125-
"@ | Out-File -FilePath checksums.txt -Encoding utf8
126-
127-
# Append to release notes
128-
Get-Content checksums.txt | Out-File -FilePath release_notes.md -Append -Encoding utf8
126+
"@ | Out-File -FilePath release_notes.md -Append -Encoding utf8
129127
130128
- name: Create Draft Release
131129
uses: softprops/action-gh-release@v2
@@ -137,7 +135,6 @@ jobs:
137135
body_path: release_notes.md
138136
files: |
139137
FFmpegInstaller.exe
140-
checksums.txt
141138
env:
142139
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143140

@@ -147,6 +144,5 @@ jobs:
147144
name: ffmpeg-installer-v${{ steps.get_version.outputs.VERSION }}
148145
path: |
149146
FFmpegInstaller.exe
150-
checksums.txt
151147
release_notes.md
152148
retention-days: 30

0 commit comments

Comments
 (0)