Skip to content

Commit

Permalink
feat: build and sign apk once
Browse files Browse the repository at this point in the history
  • Loading branch information
hjiangsu committed Jan 7, 2025
1 parent a1a00ed commit 90e022c
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,6 @@ jobs:
rm apksign.keystore
echo "Finished signing Android APKs"
- name: Build F-Droid APK
run: flutter build apk --release

- name: Sign F-Droid APK
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
run: |
echo "${KEYSTORE_BASE64}" | base64 -d > fdroid.keystore
for apk in ./build/app/outputs/flutter-apk/*-release.apk; do
unsignedFn=${apk/-release/-unsigned}
mv "$apk" "$unsignedFn"
${ANDROID_HOME}/build-tools/$(ls ${ANDROID_HOME}/build-tools/ | tail -1)/apksigner sign --ks fdroid.keystore --ks-pass pass:"${KEYSTORE_PASSWORD}" --out "${apk}" "${unsignedFn}"
shasum -a 256 ${apk} | cut -d " " -f 1 > "$apk".sha256
echo "${apk} | $(shasum -a 256 ${apk} | cut -d " " -f 1)"
done
rm fdroid.keystore
echo "Finished signing F-Droid APKs"
- name: Create release and upload artifacts
if: ${{ inputs.test_run }} == 'false'
uses: ncipollo/release-action@v1
Expand Down

0 comments on commit 90e022c

Please sign in to comment.