Skip to content

Commit 48077fb

Browse files
Update android_build.yml
1 parent 3ffffc2 commit 48077fb

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/android_build.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
uses: actions/setup-node@v4
2121
with:
2222
node-version: 20
23-
# Cache removed to prevent "lock file not found" error
2423

2524
- name: Setup Java JDK
2625
uses: actions/setup-java@v3
@@ -31,7 +30,7 @@ jobs:
3130
- name: Install Dependencies
3231
run: |
3332
npm install
34-
npm install @capacitor/core @capacitor/cli @capacitor/android @capacitor/assets --save-dev
33+
npm install @capacitor/core @capacitor/cli @capacitor/android @capacitor/assets @capacitor/filesystem @capacitor/share --save
3534
3635
- name: Build Web App
3736
run: npm run build
@@ -40,12 +39,19 @@ jobs:
4039
run: |
4140
npx cap add android
4241
43-
- name: Generate App Icons & Splash
44-
# Downloads the logo referenced in your manifest to serve as the App Icon
42+
# --- FIXED ICON GENERATION STEP ---
43+
# Instead of downloading, we CREATE the SVG file right here.
44+
# This ensures the file exists and uses your custom brand design.
45+
- name: Create Custom Icon Asset
4546
run: |
4647
mkdir -p assets
47-
curl -o assets/logo.png https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/kali-linux.png
48-
npx @capacitor/assets generate --iconBackgroundColor '#050505' --splashBackgroundColor '#050505' --assetPath assets/logo.png --android
48+
# This writes the SVG code directly into assets/logo.svg
49+
echo '<svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#0a0a0a"/><stop offset="100%" stop-color="#000"/></linearGradient></defs><rect width="512" height="512" rx="100" fill="url(#g)"/><path d="M256 50L80 140v190c0 80 176 132 176 132s176-52 176-132V140L256 50z" fill="none" stroke="#C5A059" stroke-width="15"/><g transform="translate(106,106) scale(3)"><path d="M75 25L35 25 15 50l20 25h40" stroke="#C5A059" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/><circle cx="40" cy="50" r="10" stroke="#C5A059" stroke-width="6"/><path d="M50 50h35M68 50v12M78 50v8" stroke="#C5A059" stroke-width="6" stroke-linecap="round"/></g></svg>' > assets/logo.svg
50+
51+
- name: Generate Android Icons
52+
# Now we point to the LOCAL file we just created
53+
run: |
54+
npx @capacitor/assets generate --iconBackgroundColor '#050505' --splashBackgroundColor '#050505' --assetPath assets/logo.svg --android
4955
5056
- name: Sync Capacitor
5157
run: npx cap sync android

0 commit comments

Comments
 (0)