From e821dd4e94b4e646f046986286742d309fc86f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:00:59 +0200 Subject: [PATCH] Log hashes of executables as notice messages --- ci/actions/deploy.sh | 12 +++++------- ci/actions/windows/deploy.ps1 | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ci/actions/deploy.sh b/ci/actions/deploy.sh index cc6f754f..2a199739 100755 --- a/ci/actions/deploy.sh +++ b/ci/actions/deploy.sh @@ -20,8 +20,6 @@ case "${NETWORK}" in esac if [[ -n "${S3_BUILD_DIRECTORY}" ]]; then - - DIRECTORY="${S3_BUILD_DIRECTORY}/${BUILD}" else DIRECTORY=$BUILD @@ -33,7 +31,7 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then for rpm in $RPMS; do SHA=$(sha256sum ${rpm}) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA > ${GITHUB_WORKSPACE}/$(basename "${rpm}.sha256") aws s3 cp ${rpm} s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/$(basename "${rpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -42,7 +40,7 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then for srpm in $SRPMS; do SHA=$(sha256sum ${srpm}) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA > ${GITHUB_WORKSPACE}/$(basename "${srpm}).sha256") aws s3 cp ${srpm} s3://${S3_BUCKET_NAME}/$DIRECTORY/source/$(basename "${srpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -50,11 +48,11 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then done elif [[ "$OS" == 'Linux' ]]; then SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.tar.bz2.sha256 SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.deb) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256 aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Linux.tar.bz2 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -63,7 +61,7 @@ elif [[ "$OS" == 'Linux' ]]; then aws s3 cp $GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256 s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Linux.deb.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers else SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA >$GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256 aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers diff --git a/ci/actions/windows/deploy.ps1 b/ci/actions/windows/deploy.ps1 index 4a859ece..6b53357b 100644 --- a/ci/actions/windows/deploy.ps1 +++ b/ci/actions/windows/deploy.ps1 @@ -27,8 +27,8 @@ $zip_hash = ((Get-FileHash $zip).hash)+" "+(split-path -Path $zip -Resolve -leaf $exe_hash | Out-file -FilePath "$exe.sha256" $zip_hash | Out-file -FilePath "$zip.sha256" -Write-Output "Hash: $exe_hash" -Write-Output "Hash: $zip_hash" +Write-Output "::notice::Hash: $exe_hash" +Write-Output "::notice::Hash: $zip_hash" aws s3 cp "$exe" s3://$env:S3_BUCKET_NAME/$directory/binaries/nano-node-$env:TAG-win64.exe --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers aws s3 cp "$exe.sha256" s3://$env:S3_BUCKET_NAME/$directory/binaries/nano-node-$env:TAG-win64.exe.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers