From 90e022cbe854a0ac9b368e15c6b408233073bf7a Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Mon, 6 Jan 2025 21:37:46 -0800 Subject: [PATCH] feat: build and sign apk once --- .github/workflows/release.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da2c45876..4bafbd34d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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