Skip to content

Commit

Permalink
Merge pull request #77 from remyroy/filename-sha256
Browse files Browse the repository at this point in the history
Better name for build sha256 filenames
  • Loading branch information
valefar-on-discord authored Jul 25, 2024
2 parents 7993d3d + 2212545 commit af535a8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ jobs:
env:
GPG_KEY_ID: ${{ steps.import-gpg-key.outputs.fingerprint }}
run: |
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME}
export ARCHIVE_FILE_NAME=${BUILD_FILE_NAME}.tar.gz
echo "ARCHIVE_FILE_NAME=${ARCHIVE_FILE_NAME}" >> "$GITHUB_ENV"
tar -zcvf ${ARCHIVE_FILE_NAME} ./${BUILD_FILE_NAME}
mkdir -p output/artifacts
cp ${BUILD_FILE_NAME}.tar.gz output/artifacts
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > output/artifacts/${BUILD_FILE_NAME}.sha256
gpg --default-key ${GPG_KEY_ID} --sign --armor --output output/artifacts/${BUILD_FILE_NAME}.tar.gz.asc --detach-sig ${BUILD_FILE_NAME}.tar.gz
cp ${ARCHIVE_FILE_NAME} output/artifacts
sha256sum ${ARCHIVE_FILE_NAME} | head -c 64 > output/artifacts/${ARCHIVE_FILE_NAME}.sha256
gpg --default-key ${GPG_KEY_ID} --sign --armor --output output/artifacts/${ARCHIVE_FILE_NAME}.asc --detach-sig ${ARCHIVE_FILE_NAME}
- name: Create archive, checksum and GPG signature (Windows)
if: ${{ startsWith(matrix.os, 'windows-') }}
env:
Expand All @@ -110,7 +112,7 @@ jobs:
Compress-Archive -Path $env:BUILD_FILE_NAME_PATH -DestinationPath $env:ZIP_FILE_NAME
mkdir output\artifacts
copy $env:ZIP_FILE_NAME output\artifacts
$env:CHECKSUM_FILE_NAME_PATH = ("output\artifacts\" + $env:BUILD_FILE_NAME + ".sha256")
$env:CHECKSUM_FILE_NAME_PATH = ("output\artifacts\" + $env:ZIP_FILE_NAME + ".sha256")
certUtil -hashfile $env:ZIP_FILE_NAME SHA256 | findstr /i /v "SHA256" | findstr /i /v "CertUtil" > $env:CHECKSUM_FILE_NAME_PATH
$env:SIGNATURE_FILE_NAME_PATH = ("output\artifacts\" + $env:ZIP_FILE_NAME + ".asc")
gpg --default-key $env:GPG_KEY_ID --sign --armor --output $env:SIGNATURE_FILE_NAME_PATH --detach-sig $env:ZIP_FILE_NAME
Expand Down

0 comments on commit af535a8

Please sign in to comment.