Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/build-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build signed APK

on:
push:
branches: [ "**" ]
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

- uses: gradle/actions/setup-gradle@v4

# A random signing key is generated once and kept in the Actions cache,
# so later builds are signed with the same key (and can update each
# other on the device). If GitHub evicts the cache (unused for 7 days),
# a new key is generated and the app must be reinstalled once.
- name: Restore signing key
id: key
uses: actions/cache@v4
with:
path: signing
key: release-signing-key-v1

- name: Generate signing key (first run only)
if: steps.key.outputs.cache-hit != 'true'
run: |
mkdir -p signing
PASS=$(openssl rand -hex 16)
keytool -genkeypair -v -keystore signing/release.jks -alias release \
-keyalg RSA -keysize 2048 -validity 36500 \
-storepass "$PASS" -keypass "$PASS" \
-dname "CN=Hebron File Manager, O=Hebron, C=IL"
echo "$PASS" > signing/pass.txt

- name: Build release APK
run: |
PASS=$(cat signing/pass.txt)
chmod +x gradlew
SIGNING_KEY_ALIAS=release \
SIGNING_KEY_PASSWORD="$PASS" \
SIGNING_STORE_PASSWORD="$PASS" \
SIGNING_STORE_FILE="$GITHUB_WORKSPACE/signing/release.jks" \
./gradlew assembleFossRelease --no-daemon

- uses: actions/upload-artifact@v4
with:
name: file-manager-signed-apk
path: app/build/outputs/apk/foss/release/*.apk
18 changes: 16 additions & 2 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="512" android:viewportHeight="512">
<path android:fillColor="#ffffff" android:pathData="M353.72 215.26H209.59q-15.79 0-27.5 9.93t-11.71 25.21v66.72l20.12-66.97q2.04-6.62 7.51-10.57 5.48-3.95 12.1-3.95h131.4q10.44 0 16.43 8.28 5.98 8.28 3.18 17.95l-18.33 61.12q-2.04 6.62-7.51 10.57-5.48 3.95-12.1 3.95H170.37q-8.4 0-14.39-5.98-5.98-6-5.98-14.4V194.88q0-8.4 5.98-14.39 5.98-5.98 14.39-5.98h52.71q4.07 0 7.77 1.53 3.69 1.53 6.49 4.33l14.52 14.52h81.49q8.4 0 14.39 5.98 5.98 5.98 5.98 14.39z" android:strokeWidth="0.254652"/>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M28,36 h20 l6,6 h26 a4,4 0 0,1 4,4 v24 a4,4 0 0,1 -4,4 h-52 a4,4 0 0,1 -4,-4 v-30 a4,4 0 0,1 4,-4 z" />
<path
android:fillColor="#FFB2DFDB"
android:pathData="M28,36 h20 l6,6 h-26 z" />
<path
android:fillAlpha="0.9"
android:fillColor="#FFFFFFFF"
android:pathData="M24,46 h60 a4,4 0 0,1 4,4 v20 a4,4 0 0,1 -4,4 h-60 a4,4 0 0,1 -4,-4 v-20 a4,4 0 0,1 4,-4 z" />
</vector>
11 changes: 9 additions & 2 deletions app/src/main/res/drawable/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="512" android:viewportHeight="512">
<path android:fillColor="#ffffff" android:pathData="M353.72 215.26H209.59q-15.79 0-27.5 9.93t-11.71 25.21v66.72l20.12-66.97q2.04-6.62 7.51-10.57 5.48-3.95 12.1-3.95h131.4q10.44 0 16.43 8.28 5.98 8.28 3.18 17.95l-18.33 61.12q-2.04 6.62-7.51 10.57-5.48 3.95-12.1 3.95H170.37q-8.4 0-14.39-5.98-5.98-6-5.98-14.4V194.88q0-8.4 5.98-14.39 5.98-5.98 14.39-5.98h52.71q4.07 0 7.77 1.53 3.69 1.53 6.49 4.33l14.52 14.52h81.49q8.4 0 14.39 5.98 5.98 5.98 5.98 14.39z" android:strokeWidth="0.254652"/>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M28,36 h20 l6,6 h26 a4,4 0 0,1 4,4 v24 a4,4 0 0,1 -4,4 h-52 a4,4 0 0,1 -4,-4 v-30 a4,4 0 0,1 4,-4 z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#106D20</color>
<color name="ic_launcher_background">#00897B</color>
</resources>
Loading