feat(update): stage 2 sha256 verification for auto-update
This commit is contained in:
@@ -89,6 +89,18 @@ jobs:
|
||||
throw "Archive not found: $archivePath"
|
||||
}
|
||||
|
||||
- name: Generate SHA256 checksum
|
||||
if: env.CONTINUE == 'true'
|
||||
shell: powershell
|
||||
run: |
|
||||
$version = "${{ steps.extract_version.outputs.version }}"
|
||||
$archiveName = "AnabasisManager-$version.zip"
|
||||
$archivePath = "dist/$archiveName"
|
||||
$checksumPath = "dist/$archiveName.sha256"
|
||||
$hash = (Get-FileHash -Path $archivePath -Algorithm SHA256).Hash.ToLower()
|
||||
"$hash $archiveName" | Set-Content -Path $checksumPath -Encoding UTF8
|
||||
Write-Host "Checksum created: $checksumPath"
|
||||
|
||||
- name: Configure git identity
|
||||
if: env.CONTINUE == 'true'
|
||||
shell: powershell
|
||||
@@ -118,3 +130,4 @@ jobs:
|
||||
Desktop release v${{ steps.extract_version.outputs.version }}
|
||||
files: |
|
||||
dist/AnabasisManager-${{ steps.extract_version.outputs.version }}.zip
|
||||
dist/AnabasisManager-${{ steps.extract_version.outputs.version }}.zip.sha256
|
||||
|
||||
Reference in New Issue
Block a user