From 29211da4e49149f8a7f34fcd4826f6e2a37a21dd Mon Sep 17 00:00:00 2001 From: hammer Date: Fri, 30 Jan 2026 01:55:05 +0000 Subject: [PATCH] Add CI/CD workflow --- .gitea/workflows/ci.yml | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..80317f5 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.x' + channel: stable + + - name: Install dependencies + run: flutter pub get + + - name: Analyze + run: flutter analyze + + - name: Run tests + run: flutter test + + build-apk: + needs: test + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.x' + channel: stable + + - name: Install dependencies + run: flutter pub get + + - name: Build APK + run: flutter build apk --release