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 1/8] 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 }} From 7f630676c04363307a4939faa908ecd10ad74878 Mon Sep 17 00:00:00 2001 From: Alex Verner <119082209+Retengart@users.noreply.github.com> Date: Sat, 25 Jan 2025 00:27:59 +0300 Subject: [PATCH 2/8] sha256 beautification --- .github/workflows/build-linux.yml | 5 +++-- .github/workflows/build-macos.yml | 2 +- .github/workflows/build-windows.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 1bd1cc5..93c7e1d 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -86,5 +86,6 @@ jobs: tag_name: ${{ env.VERSION }} make_latest: true body: | - **Picocrypt sha256**: ${{ env.CHECKSUM_PICOCRYPT }} - **Picocrypt.deb sha256**: ${{ env.CHECKSUM_DEB }} + **SHA256:** + **Picocrypt ${{ env.CHECKSUM_PICOCRYPT }} + **Picocrypt.deb ${{ env.CHECKSUM_DEB }} diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 6d98f94..281b5c0 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -76,4 +76,4 @@ jobs: tag_name: ${{ env.VERSION }} make_latest: true body: | - **Picocrypt.dmg sha256**: ${{ env.CHECKSUM_PICOCRYPT }} + **Picocrypt.dmg ${{ env.CHECKSUM_PICOCRYPT }} diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 5b76173..e1eef1e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -92,4 +92,4 @@ jobs: tag_name: ${{ env.VERSION }} make_latest: true body: | - **Picocrypt.exe sha256**: ${{ env.CHECKSUM_PICOCRYPT }} + **Picocrypt.exe ${{ env.CHECKSUM_PICOCRYPT }} From 5c9e6e82ec928df0a8e51792c8875e7368ec0022 Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:04:30 -0500 Subject: [PATCH 3/8] Update build-linux.yml: append_body = true --- .github/workflows/build-linux.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 93c7e1d..79672b5 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -5,10 +5,11 @@ permissions: on: push: - paths: - - "VERSION" - branches: - - main + paths: + - "VERSION" + branches: + - main + workflow_dispatch: jobs: build: @@ -38,7 +39,7 @@ jobs: go build -v -ldflags="-s -w" -o Picocrypt Picocrypt.go env: CGO_ENABLED: 1 - GOAMD64: v2 + GOAMD64: v1 - name: Package as .deb run: | @@ -85,7 +86,7 @@ jobs: Picocrypt.deb tag_name: ${{ env.VERSION }} make_latest: true + append_body: true body: | - **SHA256:** - **Picocrypt ${{ env.CHECKSUM_PICOCRYPT }} - **Picocrypt.deb ${{ env.CHECKSUM_DEB }} + `sha256(Picocrypt) ${{ env.CHECKSUM_PICOCRYPT }}` + `sha256(Picocrypt.deb) ${{ env.CHECKSUM_DEB }}` From f89fc1f1532f503f73085f4da52ce95ca23182f5 Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:10:34 -0500 Subject: [PATCH 4/8] Update build-macos.yml: append_body = true --- .github/workflows/build-macos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 281b5c0..78a6739 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -9,6 +9,7 @@ on: - "VERSION" branches: - main + workflow_dispatch: jobs: build: @@ -75,5 +76,6 @@ jobs: Picocrypt.dmg tag_name: ${{ env.VERSION }} make_latest: true + append_body: true body: | - **Picocrypt.dmg ${{ env.CHECKSUM_PICOCRYPT }} + `sha256(Picocrypt.dmg) ${{ env.CHECKSUM_PICOCRYPT }}` From dfa51d5a2c03835c52d999aba0140c6733e8137f Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:18:04 -0500 Subject: [PATCH 5/8] Update build-linux.yml: small release body text change --- .github/workflows/build-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 79672b5..90b7d1a 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -88,5 +88,6 @@ jobs: make_latest: true append_body: true body: | + **Linux:** `sha256(Picocrypt) ${{ env.CHECKSUM_PICOCRYPT }}` `sha256(Picocrypt.deb) ${{ env.CHECKSUM_DEB }}` From b043713c0e43304f527e88859077af9eb2671020 Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:18:36 -0500 Subject: [PATCH 6/8] Update build-macos.yml --- .github/workflows/build-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 78a6739..72d11aa 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -78,4 +78,5 @@ jobs: make_latest: true append_body: true body: | + **macOS:** `sha256(Picocrypt.dmg) ${{ env.CHECKSUM_PICOCRYPT }}` From a14b95b43060e3e4fe193fc3eacb660ab9af0c8a Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:20:04 -0500 Subject: [PATCH 7/8] Update build-windows.yml: change release body checksum format --- .github/workflows/build-windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index e1eef1e..4646967 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -92,4 +92,5 @@ jobs: tag_name: ${{ env.VERSION }} make_latest: true body: | - **Picocrypt.exe ${{ env.CHECKSUM_PICOCRYPT }} + **Windows:** + `sha256(Picocrypt.exe) ${{ env.CHECKSUM_PICOCRYPT }}` From 2862853176ba4381a45774a84c88186904dea47b Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:35:31 -0500 Subject: [PATCH 8/8] Update build-windows.yml: add append_body: true --- .github/workflows/build-windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 4646967..85e2f4d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -91,6 +91,7 @@ jobs: src/Picocrypt.exe tag_name: ${{ env.VERSION }} make_latest: true + append_body: true body: | **Windows:** `sha256(Picocrypt.exe) ${{ env.CHECKSUM_PICOCRYPT }}`