From 1d99c729dd6fe411e28949405f7d2af813700230 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Mar 2026 21:52:45 +0100 Subject: [PATCH] move CI workflow to .gitea and remove .github remnants --- .gitea/workflows/ci.yml | 141 +++----------------------------- .github/copilot-instructions.md | 45 ---------- .github/workflows/ci.yml | 15 ---- 3 files changed, 11 insertions(+), 190 deletions(-) delete mode 100644 .github/copilot-instructions.md delete mode 100644 .github/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 732b3d4..fa46900 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,134 +1,15 @@ -name: Build App -on: - push: - branches: - - main +name: CI + +on: [push, pull_request] jobs: - build-android: + build: runs-on: ubuntu-latest steps: - - name: 🏗 Setup repo - uses: actions/checkout@v2 - - - name: 🏗 Setup Node - uses: actions/setup-node@v2 - with: - node-version: 22 - - - name: 🏗 Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: latest - - - name: 🏗 Setup Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 17 - - - name: 🏗 Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: 🏗 Setup Expo and EAS - uses: expo/expo-github-action@v8 - with: - token: ${{ secrets.EXPO_TOKEN }} - eas-version: latest - packager: pnpm - - - name: 📦 Install dependencies - run: pnpm install - - - name: 👷 Build app - run: | - eas build --local \ - --non-interactive \ - --output=./app-build \ - --platform=android \ - --profile=preview - - - name: 📝 Rename build to APK - run: mv app-build app-release.apk - - - name: 📤 Upload build artifact - uses: actions/upload-artifact@v3 - with: - name: android-preview-build - path: app-release.apk - if-no-files-found: error - - build-web: - runs-on: ubuntu-latest - steps: - - name: 🏗 Setup repo - uses: actions/checkout@v2 - - - name: 🏗 Setup Node - uses: actions/setup-node@v2 - with: - node-version: 22 - - - name: 🏗 Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: latest - - - name: 🏗 Setup Expo and EAS - uses: expo/expo-github-action@v8 - with: - token: ${{ secrets.EXPO_TOKEN }} - eas-version: latest - packager: pnpm - - - name: 📦 Install dependencies - run: pnpm install - - - name: 👷 Build web - run: npx expo export --platform web - - - name: 📦 Zip dist - run: cd dist && zip -r ../dist.zip . - - - name: 📤 Upload build artifact - uses: actions/upload-artifact@v3 - with: - name: web-build - path: dist.zip - if-no-files-found: error - - release: - runs-on: ubuntu-latest - needs: [build-android, build-web] - steps: - - name: 🏗 Setup repo - uses: actions/checkout@v2 - - - name: 📥 Download Android artifact - uses: actions/download-artifact@v3 - with: - name: android-preview-build - - - name: 📥 Download Web artifact - uses: actions/download-artifact@v3 - with: - name: web-build - - - name: 🏷 Create tag - run: | - TAG="build-$(git rev-parse --short HEAD)" - git tag "$TAG" - git push origin "$TAG" - echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV - - - name: 🚀 Create release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ env.RELEASE_TAG }} - name: ${{ env.RELEASE_TAG }} - files: | - app-release.apk - dist.zip - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Install dependencies + run: npm install diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 66097bb..0000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,45 +0,0 @@ -# Project Guidelines - -## Code Style -- Keep components as functional React components and use hooks-based state. -- Follow existing naming and structure in `src/screens` and `src/components`: - - Screen files: `*Screen.js` - - Shared UI pieces: `src/components/*.js` -- Keep styling centralized in `src/styles.js` via `createStyles()` and use theme-driven inline color overrides in screens/components. -- Reuse `getTheme(darkMode, pinkMode)` from `src/theme.js` for color values; do not hardcode alternate palettes in individual screens. - -## Architecture -- Root orchestration lives in `App.js`: - - App-level state includes current screen, focus mode, theme toggles, and timer/countdown state. - - Screen switching is controlled by the `screen` state (`home`, `timeuntil`, `timer`). -- Screen responsibilities: - - `HomeScreen`: mode selection and top controls. - - `TimeUntilScreen`: target clock-time countdown flow. - - `TimerScreen`: duration countdown flow. - - `FocusScreen`: minimal fullscreen countdown UI. -- Shared presentational components: - - `TopControls`: dark/pink/fullscreen/focus controls. - - `CountdownRow`: reusable HH:MM:SS display. - -## Build And Run -- Install dependencies: `npm install` -- Start dev server: `npm start` -- Run on Android: `npm run android` -- Run on iOS: `npm run ios` -- Run on web: `npm run web` -- EAS builds use `eas.json` profiles (`development`, `preview`, `production`). - -## Conventions -- Keep timer/countdown behavior in `App.js` unless intentionally refactoring architecture. -- Preserve current time behavior: - - `now` updates every second with `setInterval`. - - Time-until target is based on local device time and rolls to next day when target time has passed. -- Maintain platform guards: - - Web-only fullscreen uses `document.fullscreenElement` APIs. - - Android hardware back behavior is handled in `App.js` and should keep focus/screen fallback behavior. -- For countdown display, continue using `CountdownRow` and 2-digit padded units for consistency. - -## Pitfalls -- This project has no test scripts configured; do not claim tests were run unless you add and run them. -- Be careful with web-only globals (`document`) and keep `Platform.OS` guards. -- Avoid introducing timezone assumptions without explicit product requirements; current logic is local-time based. \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index fa46900..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '22' - - name: Install dependencies - run: npm install