chore: update icon
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
name: Frontend Client - EAS Update
|
name: Frontend Client - EAS Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
paths:
|
||||||
- "mobile/**"
|
- "mobile/**"
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- "mobile/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
typecheck:
|
typecheck:
|
||||||
@@ -28,7 +32,7 @@ jobs:
|
|||||||
working-directory: mobile
|
working-directory: mobile
|
||||||
run: npx tsc --noEmit
|
run: npx tsc --noEmit
|
||||||
|
|
||||||
eas-update:
|
build-apk-prod:
|
||||||
needs: typecheck
|
needs: typecheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@@ -58,10 +62,25 @@ jobs:
|
|||||||
jq '.expo.extra.eas.projectId = "${{ secrets.EXPO_PROJECT_ID_CLIENT }}"' app.json > app.tmp.json
|
jq '.expo.extra.eas.projectId = "${{ secrets.EXPO_PROJECT_ID_CLIENT }}"' app.json > app.tmp.json
|
||||||
mv app.tmp.json app.json
|
mv app.tmp.json app.json
|
||||||
|
|
||||||
- name: Map channel to branch
|
- name: Debug app.json
|
||||||
working-directory: mobile
|
working-directory: mobile
|
||||||
run: eas channel:edit production --branch main --non-interactive
|
run: cat app.json
|
||||||
|
|
||||||
- name: Publish OTA update
|
- name: Build production APK
|
||||||
working-directory: mobile
|
working-directory: mobile
|
||||||
run: eas update --channel production --platform android --message "${{ github.event.head_commit.message }}" --non-interactive
|
env:
|
||||||
|
EAS_BUILD_NO_EXPO_GO_WARNING: true
|
||||||
|
run: eas build --platform android --profile production --non-interactive
|
||||||
|
|
||||||
|
- name: Download production APK
|
||||||
|
working-directory: mobile
|
||||||
|
run: |
|
||||||
|
APK_URL=$(eas build:list --platform android --status finished --limit 1 --json --non-interactive | jq -r '.[0].artifacts.buildUrl')
|
||||||
|
curl -L -o client-panel-prod.apk "$APK_URL"
|
||||||
|
|
||||||
|
- name: Upload production APK artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: client-panel-android-prod-apk
|
||||||
|
path: mobile/client-panel-prod.apk
|
||||||
|
retention-days: 14
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
# Expo local state (in sub-projects)
|
# Expo local state (in sub-projects)
|
||||||
**/.expo/
|
**/.expo/
|
||||||
test_address.sh
|
test_address.sh
|
||||||
|
easpip
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ export function NotificationProvider({ children }: { children: ReactNode }) {
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
// Enregistrement push notifications
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let isMounted = true;
|
let isMounted = true;
|
||||||
|
|
||||||
@@ -103,18 +102,14 @@ export function NotificationProvider({ children }: { children: ReactNode }) {
|
|||||||
const token = await getToken();
|
const token = await getToken();
|
||||||
if (!token) return;
|
if (!token) return;
|
||||||
|
|
||||||
// Configurer le channel Android
|
|
||||||
await setupNotificationChannel();
|
await setupNotificationChannel();
|
||||||
|
|
||||||
// Obtenir le push token
|
|
||||||
const expoPushToken = await registerForPushNotificationsAsync();
|
const expoPushToken = await registerForPushNotificationsAsync();
|
||||||
if (expoPushToken && isMounted) {
|
if (expoPushToken && isMounted) {
|
||||||
setPushToken(expoPushToken);
|
setPushToken(expoPushToken);
|
||||||
// Envoyer au backend
|
|
||||||
await sendPushTokenToBackend(expoPushToken);
|
await sendPushTokenToBackend(expoPushToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vérifier si l'app a été ouverte par une notification
|
|
||||||
const lastResponse = await getLastNotificationResponse();
|
const lastResponse = await getLastNotificationResponse();
|
||||||
if (lastResponse && isMounted) {
|
if (lastResponse && isMounted) {
|
||||||
const data = lastResponse.notification.request.content.data;
|
const data = lastResponse.notification.request.content.data;
|
||||||
@@ -131,9 +126,7 @@ export function NotificationProvider({ children }: { children: ReactNode }) {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Listeners pour les notifications push
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Notification reçue en foreground
|
|
||||||
const receivedSub = addNotificationReceivedListener((notification) => {
|
const receivedSub = addNotificationReceivedListener((notification) => {
|
||||||
const { title, body } = notification.request.content;
|
const { title, body } = notification.request.content;
|
||||||
const data = notification.request.content.data;
|
const data = notification.request.content.data;
|
||||||
|
|||||||
Reference in New Issue
Block a user