From 2e3a75e685258961bc8efdb95dde12727b93a04a Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Tue, 21 Nov 2023 14:27:08 +0200 Subject: [PATCH] Calculate and upload build artifact sha256 checksums Change-type: minor --- .github/actions/publish/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index 80a0acd4..be559f1e 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -124,12 +124,18 @@ runs: APPLICATION_VERSION="$(jq -r '.version' package.json)" if [[ "${RUNNER_OS}" == Linux ]]; then + PLATFORM=Linux BUILD_ARCHS="x64" + SHA256SUM_BIN=sha256sum elif [[ "${RUNNER_OS}" == macOS ]]; then + PLATFORM=Darwin BUILD_ARCHS="x64,arm64" + SHA256SUM_BIN='shasum -a 256' elif [[ "${RUNNER_OS}" == Windows ]]; then + PLATFORM=Windows + SHA256SUM_BIN=sha256sum #BUILD_ARCHS="ia32,x64" -- distutils fails to build for ia32 BUILD_ARCHS="x64" @@ -152,6 +158,12 @@ runs: -iname "*.AppImage" -o \ -iname "*Setup.exe" \ \) -ls -exec cp '{}' dist/ \; + + if [[ -n "${SHA256SUM_BIN}" ]]; then + # Compute and save digests. + cd dist/ + ${SHA256SUM_BIN} *.* >"SHA256SUMS.${PLATFORM}.txt" + fi env: # ensure we sign the artifacts NODE_ENV: production