diff --git a/.github/workflows/build-check.yaml b/.github/workflows/build-check.yaml index 56981af5..f6d03997 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/build-check.yaml @@ -159,19 +159,15 @@ jobs: if: matrix.config.publishArtifacts uses: actions/upload-artifact@v7 with: - name: zeal-${{ env.ZEAL_VERSION }}${{ matrix.config.configurePreset == 'release-portable' && '-portable' || '' }}-windows-x64.zip - path: | - build/${{ matrix.config.configurePreset }}/zeal-*.zip - build/${{ matrix.config.configurePreset }}/zeal-*.zip.sha256 + path: build/${{ matrix.config.configurePreset }}/zeal-*.zip + archive: false - name: Upload MSI Artifacts if: matrix.config.publishArtifacts && matrix.config.configurePreset == 'release' uses: actions/upload-artifact@v7 with: - name: zeal-${{ env.ZEAL_VERSION }}-windows-x64.msi - path: | - build/${{ matrix.config.configurePreset }}/zeal-*.msi - build/${{ matrix.config.configurePreset }}/zeal-*.msi.sha256 + path: build/${{ matrix.config.configurePreset }}/zeal-*.msi + archive: false build-macos: name: ${{ matrix.config.name }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4333a561..2497e774 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: qt_version: "6.10.2" configurePreset: release buildPreset: release - uploadPattern: "zeal-*-windows-x64.msi*" + uploadPattern: "zeal-*-windows-x64.msi" - name: Windows Server 2022 / Portable os: windows-2022 arch: win64_msvc2022_64 @@ -167,9 +167,6 @@ jobs: --plugin qt \ --output appimage - - name: Generate Digest Files - run: for file in Zeal-*.AppImage*; do sha256sum $file > $file.sha256; done - - name: Upload Release Assets run: gh release upload ${{ github.ref_name }} --clobber Zeal-*.AppImage* env: diff --git a/pkg/chocolatey/update.ps1 b/pkg/chocolatey/update.ps1 index ec2f5a37..1f3ded2e 100644 --- a/pkg/chocolatey/update.ps1 +++ b/pkg/chocolatey/update.ps1 @@ -19,9 +19,9 @@ if ($Version) { throw "Invalid version format: '$Version'. Expected format: X.Y.Z" } - # Verify the release exists. + # Fetch the release metadata. try { - Invoke-RestMethod -Uri "https://api.github.com/repos/zealdocs/zeal/releases/tags/v$Version" | Out-Null + $release = Invoke-RestMethod -Uri "https://api.github.com/repos/zealdocs/zeal/releases/tags/v$Version" } catch { throw "Release v$Version not found on GitHub." } @@ -49,8 +49,8 @@ if ($Version) { Write-Information "Portable checksum: $portableChecksum" Write-Information "Verifying checksums against release digests..." - $msiDigest = ((Invoke-WebRequest -Uri "$msiUrl.sha256").ToString().Trim() -split '\s+')[0] - $portableDigest = ((Invoke-WebRequest -Uri "$portableUrl.sha256").ToString().Trim() -split '\s+')[0] + $msiDigest = ($release.assets | Where-Object { $_.name -eq "zeal-$Version-windows-x64.msi" }).digest -replace '^sha256:', '' + $portableDigest = ($release.assets | Where-Object { $_.name -eq "zeal-$Version-portable-windows-x64.7z" }).digest -replace '^sha256:', '' if ($msiChecksum -ne $msiDigest) { throw "MSI checksum mismatch! Expected: $msiDigest, Got: $msiChecksum" diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 92aefc80..df012fa1 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -140,8 +140,6 @@ set(CPACK_CREATE_DESKTOP_LINKS ${_project_output_name} ${CPACK_PACKAGE_NAME}) set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") -set(CPACK_PACKAGE_CHECKSUM SHA256) - if(WIN32) # CPack WiX configuration. # Requires WiX 4 or 5; avoid WiX 6+ (Open Source Maintenance Fee terms).