diff --git a/.github/workflows/insider-windows.yml b/.github/workflows/insider-windows.yml index 4bb41dc9153..4282d7ee932 100644 --- a/.github/workflows/insider-windows.yml +++ b/.github/workflows/insider-windows.yml @@ -124,6 +124,10 @@ jobs: output-artifact-directory: assets/ if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + - name: Prepare checksums + run: ./prepare_checksums.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + - name: Release env: GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} diff --git a/prepare_assets.sh b/prepare_assets.sh index fc3eb913dc2..0a5613f0519 100755 --- a/prepare_assets.sh +++ b/prepare_assets.sh @@ -5,18 +5,6 @@ set -e APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )" -. ./utils.sh - -npm install -g checksum - -sum_file() { - if [[ -f "${1}" ]]; then - echo "Calculating checksum for ${1}" - checksum -a sha256 "${1}" > "${1}".sha256 - checksum "${1}" > "${1}".sha1 - fi -} - mkdir -p assets if [[ "${OS_NAME}" == "osx" ]]; then @@ -226,12 +214,6 @@ if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then cd .. fi -cd assets - -for FILE in *; do - if [[ -f "${FILE}" ]]; then - sum_file "${FILE}" - fi -done - -cd .. +if [[ "${OS_NAME}" != "windows" ]]; then + ./prepare_checksums.sh +fi diff --git a/prepare_checksums.sh b/prepare_checksums.sh new file mode 100755 index 00000000000..4d5c6cf7e3e --- /dev/null +++ b/prepare_checksums.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e + +npm install -g checksum + +sum_file() { + if [[ -f "${1}" ]]; then + echo "Calculating checksum for ${1}" + checksum -a sha256 "${1}" > "${1}".sha256 + checksum "${1}" > "${1}".sha1 + fi +} + +cd assets + +for FILE in *; do + if [[ -f "${FILE}" ]]; then + sum_file "${FILE}" + fi +done + +cd ..