Skip to content

Commit fa85579

Browse files
Added|Changed!: Change sha256sums filename to checksums-sha256.txt that is generated for APKs built and uploaded to GitHub releases/actions with GitHub actions and log checksum file contents
This is done so that the checksums gets stored internally in GitHub action logs as well and if APK/checksum files attached to GitHub releases are modified manually by someone, this can be detected, at least until logs expire.
1 parent a1b0b19 commit fa85579

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/attach_debug_apk_to_release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ jobs:
4949
exit_on_error "Failed to find built APK at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk'. Files found: "$'\n'"$files_found"
5050
fi
5151
52-
echo "Generating sha25sums file"
53-
if ! (cd "$APK_DIR_PATH"; sha256sum "${APK_BASENAME_PREFIX}.apk" > sha256sums); then
54-
exit_on_error "Generate sha25sums failed for '$RELEASE_VERSION_NAME' release."
52+
echo "Generating checksums-sha256.txt file"
53+
if ! (cd "$APK_DIR_PATH"; sha256sum "${APK_BASENAME_PREFIX}.apk" > checksums-sha256.txt); then
54+
exit_on_error "Generate checksums-sha256.txt file failed for '$RELEASE_VERSION_NAME' release."
5555
fi
56+
echo "checksums-sha256.txt:"$'\n```\n'"$(cat "$APK_DIR_PATH/checksums-sha256.txt")"$'\n```'
5657
5758
echo "Attaching APK to github release"
5859
if ! hub release edit \
5960
-m "" \
6061
-a "$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk" \
61-
-a "$APK_DIR_PATH/sha256sums" \
62+
-a "$APK_DIR_PATH/checksums-sha256.txt" \
6263
"$RELEASE_VERSION_NAME"; then
6364
exit_on_error "Attach APK to release failed for '$RELEASE_VERSION_NAME' release."
6465
fi

.github/workflows/debug_build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@ jobs:
5151
exit_on_error "Failed to find built APK at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk'. Files found: "$'\n'"$files_found"
5252
fi
5353
54-
echo "Generating sha25sums file"
55-
if ! (cd "$APK_DIR_PATH"; sha256sum "${APK_BASENAME_PREFIX}.apk" > sha256sums); then
56-
exit_on_error "Generate sha25sums failed for '$RELEASE_VERSION_NAME' release."
54+
echo "Generating checksums-sha256.txt file"
55+
if ! (cd "$APK_DIR_PATH"; sha256sum "${APK_BASENAME_PREFIX}.apk" > checksums-sha256.txt); then
56+
exit_on_error "Generate checksums-sha256.txt file failed for '$RELEASE_VERSION_NAME' release."
5757
fi
58+
echo "checksums-sha256.txt:"$'\n```\n'"$(cat "$APK_DIR_PATH/checksums-sha256.txt")"$'\n```'
5859
5960
- name: Attach files
6061
uses: actions/upload-artifact@v4
6162
with:
6263
name: ${{ env.APK_BASENAME_PREFIX }}
6364
path: |
6465
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}.apk
65-
${{ env.APK_DIR_PATH }}/sha256sums
66+
${{ env.APK_DIR_PATH }}/checksums-sha256.txt
6667
${{ env.APK_DIR_PATH }}/output-metadata.json

0 commit comments

Comments
 (0)