From a90754a67efc8311eb4877c81e1f3020256afd10 Mon Sep 17 00:00:00 2001 From: Alex Verner <119082209+Retengart@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:08:04 +0300 Subject: [PATCH] build with sha256 in release body --- .github/workflows/build-linux.yml | 8 ++++++++ .github/workflows/build-macos.yml | 15 +++++++++++---- .github/workflows/build-windows.yml | 16 ++++++++++++---- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 2755a1f..1bd1cc5 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -72,6 +72,11 @@ jobs: if-no-files-found: error compression-level: 9 + - name: Generate checksums + run: | + echo "CHECKSUM_PICOCRYPT=$(sha256sum Picocrypt | cut -d ' ' -f1)" >> $GITHUB_ENV + echo "CHECKSUM_DEB=$(sha256sum Picocrypt.deb | cut -d ' ' -f1)" >> $GITHUB_ENV + - name: Release uses: softprops/action-gh-release@v2 with: @@ -80,3 +85,6 @@ jobs: Picocrypt.deb tag_name: ${{ env.VERSION }} make_latest: true + body: | + **Picocrypt sha256**: ${{ env.CHECKSUM_PICOCRYPT }} + **Picocrypt.deb sha256**: ${{ env.CHECKSUM_DEB }} diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 77d6873..6d98f94 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -5,10 +5,10 @@ permissions: on: push: - paths: - - "VERSION" - branches: - - main + paths: + - "VERSION" + branches: + - main jobs: build: @@ -63,6 +63,11 @@ jobs: VERSION=$(cat VERSION) echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Generate checksums + run: | + HASH=$(shasum -a 256 Picocrypt.dmg | cut -d ' ' -f1) + echo "CHECKSUM_PICOCRYPT=$HASH" >> $GITHUB_ENV + - name: Release uses: softprops/action-gh-release@v2 with: @@ -70,3 +75,5 @@ jobs: Picocrypt.dmg tag_name: ${{ env.VERSION }} make_latest: true + body: | + **Picocrypt.dmg sha256**: ${{ env.CHECKSUM_PICOCRYPT }} diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 00f2a70..5b76173 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -5,10 +5,10 @@ permissions: on: push: - paths: - - "VERSION" - branches: - - main + paths: + - "VERSION" + branches: + - main workflow_dispatch: jobs: @@ -78,6 +78,12 @@ jobs: $version = Get-Content -Path "VERSION" echo "VERSION=$version" >> $env:GITHUB_ENV + - name: Generate checksums + shell: pwsh + run: | + $hash = Get-FileHash "src/Picocrypt.exe" -Algorithm SHA256 + echo "CHECKSUM_PICOCRYPT=$($hash.Hash)" >> $env:GITHUB_ENV + - name: Release uses: softprops/action-gh-release@v2 with: @@ -85,3 +91,5 @@ jobs: src/Picocrypt.exe tag_name: ${{ env.VERSION }} make_latest: true + body: | + **Picocrypt.exe sha256**: ${{ env.CHECKSUM_PICOCRYPT }}