@@ -28,13 +28,13 @@ jobs:
2828
2929 build :
3030 runs-on : ubuntu-latest
31- env :
32- EXPO_PUBLIC_SENTRY_DSN : ${{ secrets.EXPO_PUBLIC_SENTRY_DSN }}
33- EXPO_PUBLIC_POSTHOG_KEY : ${{ secrets.EXPO_PUBLIC_POSTHOG_KEY }}
34- EXPO_PUBLIC_CHATWOOT_INBOX_IDENTIFIER : ${{ secrets.EXPO_PUBLIC_CHATWOOT_INBOX_IDENTIFIER }}
35- SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
36- SENTRY_ORG : ${{ secrets.SENTRY_ORG }}
37- SENTRY_PROJECT : ${{ secrets.SENTRY_PROJECT }}
31+ # env:
32+ # EXPO_PUBLIC_SENTRY_DSN: ${{ secrets.EXPO_PUBLIC_SENTRY_DSN }}
33+ # EXPO_PUBLIC_POSTHOG_KEY: ${{ secrets.EXPO_PUBLIC_POSTHOG_KEY }}
34+ # EXPO_PUBLIC_CHATWOOT_INBOX_IDENTIFIER: ${{ secrets.EXPO_PUBLIC_CHATWOOT_INBOX_IDENTIFIER }}
35+ # SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
36+ # SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
37+ # SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
3838 steps :
3939 - uses : actions/checkout@v6
4040
@@ -74,31 +74,31 @@ jobs:
7474 - name : Expo prebuild
7575 run : bunx expo prebuild --platform android --no-install
7676
77- - name : Setup signing
78- run : |
79- if [[ "${{ github.ref }}" == refs/tags/v* && -n "${{ secrets.KEYSTORE_BASE64 }}" ]]; then
80- echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
81- echo "RELEASE_STORE_FILE=release.keystore" >> "$GITHUB_ENV"
82- echo "RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> "$GITHUB_ENV"
83- echo "RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> "$GITHUB_ENV"
84- echo "RELEASE_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> "$GITHUB_ENV"
85- echo "Signing: production keystore"
86- else
87- keytool -genkey -v -keystore android/app/debug.keystore -storepass android \
88- -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 \
89- -dname "CN=Android Debug,O=Android,C=US"
90- echo "Signing: debug keystore (non-release build)"
91- fi
77+ # - name: Setup signing
78+ # run: |
79+ # if [[ "${{ github.ref }}" == refs/tags/v* && -n "${{ secrets.KEYSTORE_BASE64 }}" ]]; then
80+ # echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
81+ # echo "RELEASE_STORE_FILE=release.keystore" >> "$GITHUB_ENV"
82+ # echo "RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> "$GITHUB_ENV"
83+ # echo "RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> "$GITHUB_ENV"
84+ # echo "RELEASE_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> "$GITHUB_ENV"
85+ # echo "Signing: production keystore"
86+ # else
87+ # keytool -genkey -v -keystore android/app/debug.keystore -storepass android \
88+ # -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 \
89+ # -dname "CN=Android Debug,O=Android,C=US"
90+ # echo "Signing: debug keystore (non-release build)"
91+ # fi
9292
9393 - name : Build APK
9494 working-directory : android
95- run : ./gradlew assembleRelease
95+ run : ./gradlew assembleDebug
9696
9797 - name : Upload APK artifact
9898 uses : actions/upload-artifact@v7
9999 with :
100- name : app-release
101- path : android/app/build/outputs/apk/release /app-release .apk
100+ name : app-debug
101+ path : android/app/build/outputs/apk/debug /app-debug .apk
102102
103103 # F-Droid rebuilds this app from source using the recipe in
104104 # distribution/fdroid-submission/metadata.yml (Builds:), which applies
@@ -129,150 +129,150 @@ jobs:
129129 # environment has no access to this repo's secrets either, so baking any of
130130 # them into the JS bundle here would itself be a source of reproducible-build
131131 # divergence.
132- build-fdroid :
133- if : startsWith(github.ref, 'refs/tags/v')
134- runs-on : ubuntu-latest
135- steps :
136- - uses : actions/checkout@v6
137-
138- - uses : oven-sh/setup-bun@v2.2.0
139-
140- # F-Droid's metadata.yml prebuild patch bumps the Kotlin/Java toolchain
141- # target from 17 to 21 (see the "Apply F-Droid source patches" step
142- # below). Install both so Gradle's toolchain auto-detection can resolve
143- # either, matching F-Droid's own multi-JDK build environment.
144- - uses : actions/setup-java@v5
145- with :
146- distribution : temurin
147- java-version : 17
148-
149- - uses : actions/setup-java@v5
150- with :
151- distribution : temurin
152- java-version : 21
153-
154- - name : Setup Android SDK
155- uses : android-actions/setup-android@v4
156-
157- - name : Cache Gradle
158- uses : actions/cache@v5
159- with :
160- path : |
161- ~/.gradle/caches
162- ~/.gradle/wrapper
163- android/.gradle
164- key : ${{ runner.os }}-gradle-fdroid-${{ hashFiles('android/**/*.gradle*', 'android/gradle/wrapper/gradle-wrapper.properties') }}
165- restore-keys : |
166- ${{ runner.os }}-gradle-fdroid-
167-
168- - name : Install dependencies
169- run : bun install
170-
171- - name : Apply F-Droid source patches
172- # Mirrors distribution/fdroid-submission/metadata.yml `Builds:.prebuild`
173- # verbatim so this CI build and F-Droid's from-source rebuild patch the
174- # exact same lines/files. Keep these two in sync on any future change.
175- run : |
176- set -euxo pipefail
177-
178- # Drop the Sentry native gradle plugin apply (no SENTRY_* secrets
179- # are available in F-Droid's build environment either).
180- sed -i '/apply from.*sentry.gradle/d' android/app/build.gradle
181-
182- # F-Droid's build environment toolchains on JDK 21; bump the
183- # Kotlin/Java compile target used by RN's gradle plugin + expo-modules-core.
184- sed -i '/jvmToolchain\|JavaVersion/s/17/21/' \
185- node_modules/@react-native/gradle-plugin/*/build.gradle.kts \
186- node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JdkConfiguratorUtils.kt \
187- node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle
188- printf '\nkotlin.jvm.target.validation.mode=warning\n' >> android/gradle.properties
189-
190- # Strip Firebase Cloud Messaging from expo-notifications.
191- sed -i '/firebase/d' node_modules/expo-notifications/android/build.gradle
192- cp -a fdroid/expo-notifications-patches/. \
193- node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/
194- rm -f \
195- node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/RemoteMessageSerializer.java \
196- node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/model/triggers/FirebaseNotificationTrigger.kt
197-
198- # Strip Google Play Install Referrer (GMS-only API) from expo-application.
199- sed -i '/installreferrer/d' node_modules/expo-application/android/build.gradle
200- cp -a fdroid/expo-application-patches/. \
201- node_modules/expo-application/android/src/main/java/expo/modules/application/
202-
203- - name : Setup signing
204- run : |
205- if [[ -n "${{ secrets.KEYSTORE_BASE64 }}" ]]; then
206- echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
207- echo "RELEASE_STORE_FILE=release.keystore" >> "$GITHUB_ENV"
208- echo "RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> "$GITHUB_ENV"
209- echo "RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> "$GITHUB_ENV"
210- echo "RELEASE_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> "$GITHUB_ENV"
211- # Same production keystore as app-release.apk: F-Droid's
212- # AllowedAPKSigningKeys check requires this binary to carry the
213- # same signing certificate fingerprint.
214- echo "Signing: production keystore"
215- else
216- keytool -genkey -v -keystore android/app/debug.keystore -storepass android \
217- -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 \
218- -dname "CN=Android Debug,O=Android,C=US"
219- echo "Signing: debug keystore (non-release build)"
220- fi
221-
222- - name : Build F-Droid-flavored APK
223- working-directory : android
224- run : ./gradlew assembleRelease
225-
226- - name : Re-sign APK v1+v2 only (drop v3/v4 for fdroidserver compatibility)
227- if : ${{ env.RELEASE_STORE_FILE != '' }}
228- run : |
229- # Same rationale as publish-fdroid.yml: androguard (used by
230- # fdroidserver) crashes parsing a v2+v3 signature block pair. Force
231- # v1+v2-only here deterministically.
232- APK=android/app/build/outputs/apk/release/app-release.apk
233- APKSIGNER=$(ls "$ANDROID_HOME"/build-tools/*/apksigner | sort -V | tail -1)
234- echo "Using $APKSIGNER"
235- "$APKSIGNER" sign \
236- --ks android/app/release.keystore \
237- --ks-pass "pass:${RELEASE_STORE_PASSWORD}" \
238- --ks-key-alias "${RELEASE_KEY_ALIAS}" \
239- --key-pass "pass:${RELEASE_KEY_PASSWORD}" \
240- --v1-signing-enabled true \
241- --v2-signing-enabled true \
242- --v3-signing-enabled false \
243- --v4-signing-enabled false \
244- "$APK"
245- echo "=== signature schemes after re-sign ==="
246- "$APKSIGNER" verify -v "$APK" | grep -i "Verified using" || true
247-
248- - name : Rename artifact
249- run : cp android/app/build/outputs/apk/release/app-release.apk app-release-fdroid.apk
250-
251- - name : Upload F-Droid APK artifact
252- uses : actions/upload-artifact@v7
253- with :
254- name : app-release-fdroid
255- path : app-release-fdroid.apk
132+ # build-fdroid:
133+ # if: startsWith(github.ref, 'refs/tags/v')
134+ # runs-on: ubuntu-latest
135+ # steps:
136+ # - uses: actions/checkout@v6
137+
138+ # - uses: oven-sh/setup-bun@v2.2.0
139+
140+ # # F-Droid's metadata.yml prebuild patch bumps the Kotlin/Java toolchain
141+ # # target from 17 to 21 (see the "Apply F-Droid source patches" step
142+ # # below). Install both so Gradle's toolchain auto-detection can resolve
143+ # # either, matching F-Droid's own multi-JDK build environment.
144+ # - uses: actions/setup-java@v5
145+ # with:
146+ # distribution: temurin
147+ # java-version: 17
148+
149+ # - uses: actions/setup-java@v5
150+ # with:
151+ # distribution: temurin
152+ # java-version: 21
153+
154+ # - name: Setup Android SDK
155+ # uses: android-actions/setup-android@v4
156+
157+ # - name: Cache Gradle
158+ # uses: actions/cache@v5
159+ # with:
160+ # path: |
161+ # ~/.gradle/caches
162+ # ~/.gradle/wrapper
163+ # android/.gradle
164+ # key: ${{ runner.os }}-gradle-fdroid-${{ hashFiles('android/**/*.gradle*', 'android/gradle/wrapper/gradle-wrapper.properties') }}
165+ # restore-keys: |
166+ # ${{ runner.os }}-gradle-fdroid-
167+
168+ # - name: Install dependencies
169+ # run: bun install
170+
171+ # - name: Apply F-Droid source patches
172+ # # Mirrors distribution/fdroid-submission/metadata.yml `Builds:.prebuild`
173+ # # verbatim so this CI build and F-Droid's from-source rebuild patch the
174+ # # exact same lines/files. Keep these two in sync on any future change.
175+ # run: |
176+ # set -euxo pipefail
177+
178+ # # Drop the Sentry native gradle plugin apply (no SENTRY_* secrets
179+ # # are available in F-Droid's build environment either).
180+ # sed -i '/apply from.*sentry.gradle/d' android/app/build.gradle
181+
182+ # # F-Droid's build environment toolchains on JDK 21; bump the
183+ # # Kotlin/Java compile target used by RN's gradle plugin + expo-modules-core.
184+ # sed -i '/jvmToolchain\|JavaVersion/s/17/21/' \
185+ # node_modules/@react-native/gradle-plugin/*/build.gradle.kts \
186+ # node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/JdkConfiguratorUtils.kt \
187+ # node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle
188+ # printf '\nkotlin.jvm.target.validation.mode=warning\n' >> android/gradle.properties
189+
190+ # # Strip Firebase Cloud Messaging from expo-notifications.
191+ # sed -i '/firebase/d' node_modules/expo-notifications/android/build.gradle
192+ # cp -a fdroid/expo-notifications-patches/. \
193+ # node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/
194+ # rm -f \
195+ # node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/RemoteMessageSerializer.java \
196+ # node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/model/triggers/FirebaseNotificationTrigger.kt
197+
198+ # # Strip Google Play Install Referrer (GMS-only API) from expo-application.
199+ # sed -i '/installreferrer/d' node_modules/expo-application/android/build.gradle
200+ # cp -a fdroid/expo-application-patches/. \
201+ # node_modules/expo-application/android/src/main/java/expo/modules/application/
202+
203+ # - name: Setup signing
204+ # run: |
205+ # if [[ -n "${{ secrets.KEYSTORE_BASE64 }}" ]]; then
206+ # echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
207+ # echo "RELEASE_STORE_FILE=release.keystore" >> "$GITHUB_ENV"
208+ # echo "RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> "$GITHUB_ENV"
209+ # echo "RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> "$GITHUB_ENV"
210+ # echo "RELEASE_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> "$GITHUB_ENV"
211+ # # Same production keystore as app-release.apk: F-Droid's
212+ # # AllowedAPKSigningKeys check requires this binary to carry the
213+ # # same signing certificate fingerprint.
214+ # echo "Signing: production keystore"
215+ # else
216+ # keytool -genkey -v -keystore android/app/debug.keystore -storepass android \
217+ # -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 \
218+ # -dname "CN=Android Debug,O=Android,C=US"
219+ # echo "Signing: debug keystore (non-release build)"
220+ # fi
221+
222+ # - name: Build F-Droid-flavored APK
223+ # working-directory: android
224+ # run: ./gradlew assembleRelease
225+
226+ # - name: Re-sign APK v1+v2 only (drop v3/v4 for fdroidserver compatibility)
227+ # if: ${{ env.RELEASE_STORE_FILE != '' }}
228+ # run: |
229+ # # Same rationale as publish-fdroid.yml: androguard (used by
230+ # # fdroidserver) crashes parsing a v2+v3 signature block pair. Force
231+ # # v1+v2-only here deterministically.
232+ # APK=android/app/build/outputs/apk/release/app-release.apk
233+ # APKSIGNER=$(ls "$ANDROID_HOME"/build-tools/*/apksigner | sort -V | tail -1)
234+ # echo "Using $APKSIGNER"
235+ # "$APKSIGNER" sign \
236+ # --ks android/app/release.keystore \
237+ # --ks-pass "pass:${RELEASE_STORE_PASSWORD}" \
238+ # --ks-key-alias "${RELEASE_KEY_ALIAS}" \
239+ # --key-pass "pass:${RELEASE_KEY_PASSWORD}" \
240+ # --v1-signing-enabled true \
241+ # --v2-signing-enabled true \
242+ # --v3-signing-enabled false \
243+ # --v4-signing-enabled false \
244+ # "$APK"
245+ # echo "=== signature schemes after re-sign ==="
246+ # "$APKSIGNER" verify -v "$APK" | grep -i "Verified using" || true
247+
248+ # - name: Rename artifact
249+ # run: cp android/app/build/outputs/apk/release/app-release.apk app-release-fdroid.apk
250+
251+ # - name: Upload F-Droid APK artifact
252+ # uses: actions/upload-artifact@v7
253+ # with:
254+ # name: app-release-fdroid
255+ # path: app-release-fdroid.apk
256256
257257 release :
258- needs : [build, build-fdroid ]
258+ needs : [build]
259259 if : startsWith(github.ref, 'refs/tags/v')
260260 runs-on : ubuntu-latest
261261 permissions :
262262 contents : write
263263 steps :
264264 - uses : actions/download-artifact@v8
265265 with :
266- name : app-release
266+ name : app-debug
267267
268- - uses : actions/download-artifact@v8
269- with :
270- name : app-release -fdroid
268+ # - uses: actions/download-artifact@v8
269+ # with:
270+ # name: app-debug -fdroid
271271
272272 - name : Create Release
273273 uses : softprops/action-gh-release@v2
274274 with :
275275 files : |
276- app-release .apk
277- app-release-fdroid.apk
276+ app-debug .apk
277+ # app-release-fdroid.apk
278278 generate_release_notes : true
0 commit comments