Skip to content

Commit

Permalink
Hashes File for Improved Release Integrity (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
vagabondHustler authored Jul 16, 2023
2 parents f547d15 + b9e7503 commit f23f385
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
run: |
python setup.py bdist_msi -d .
- name: Upload artifact
- name: Upload msi artifact
uses: actions/upload-artifact@v3
with:
name: Subsearch-${{ needs.variables.outputs.valid_semver }}-win64.msi
Expand Down Expand Up @@ -276,6 +276,29 @@ jobs:
name: Subsearch-${{ needs.variables.outputs.valid_semver }}-win64.msi
path: .

- name: Create hashes file
id: hashes
run: |
$filenames = @(
"Subsearch-${{ needs.variables.outputs.valid_semver }}-win64.msi"
)
$hashAlgorithm = "SHA256"
$targetFilePath = "hashes.sha256"
foreach ($filename in $filenames) {
$filePath = $filename
$hash = Get-FileHash -Path $filePath -Algorithm $hashAlgorithm | Select-Object -ExpandProperty Hash
$line = "$hash *$filename"
$line | Out-File -FilePath $targetFilePath -Append
}
- name: Upload hashes artifact
uses: actions/upload-artifact@v3
with:
name: hashes.sha256
path: hashes.sha256

- name: Publish release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit f23f385

Please sign in to comment.