Skip to content

Commit c1af5e2

Browse files
committed
Merge branch 'main' of pri:PriDebnath/Notes
2 parents a3ec5ba + 1706cf7 commit c1af5e2

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

‎.github/workflows/deploy_frontend_to_pages.yml‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,65 @@ jobs:
5656
- name: Deploy
5757
id: deployment
5858
uses: actions/deploy-pages@v4
59+
60+
build-android:
61+
runs-on: ubuntu-latest
62+
needs: deploy # wait for pages deploy (optional but clean)
63+
64+
permissions:
65+
contents: write
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- name: Setup Node
71+
uses: actions/setup-node@v4
72+
with:
73+
node-version: 22
74+
75+
- name: Setup pnpm
76+
uses: pnpm/action-setup@v3
77+
with:
78+
version: 9
79+
80+
- name: Install frontend deps
81+
working-directory: frontend
82+
run: pnpm install
83+
84+
- name: Build web app
85+
working-directory: frontend
86+
run: pnpm run build
87+
88+
- name: Sync Capacitor
89+
working-directory: frontend
90+
run: npx cap sync android
91+
92+
- name: Setup Java
93+
uses: actions/setup-java@v4
94+
with:
95+
distribution: temurin
96+
java-version: 17
97+
98+
- name: Build Debug APK
99+
working-directory: frontend/android
100+
run: ./gradlew assembleDebug
101+
102+
- name: Upload APK artifact
103+
uses: actions/upload-artifact@v4
104+
with:
105+
name: Notes-Android-APK
106+
path: frontend/android/app/build/outputs/apk/debug/app-debug.apk
107+
108+
- name: Update README with APK link
109+
run: |
110+
APK_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
111+
sed -i "/## 📱 Android App/,+2c\\## 📱 Android App\n\n⬇️ **Latest APK:** \n$APK_URL" README.md
112+
113+
- name: Commit README update
114+
run: |
115+
git config user.name "github-actions"
116+
git config user.email "github-actions@github.com"
117+
git add README.md
118+
git commit -m "chore: update Android APK link" || echo "No changes"
119+
git push
120+

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ Notes turns your ideas, quotes, and short writings into a personal library you e
4848
* Thinkers and journalers who enjoy short-form notes
4949

5050
---
51+
## 📱 Android App
52+
53+
⬇️ **Latest APK:**
54+
(Updated automatically)
5155

0 commit comments

Comments
 (0)