From 4a83019f40f313c0d868b308f6af6e5eb11c6cbe Mon Sep 17 00:00:00 2001 From: agent-arq Date: Sat, 4 Apr 2026 16:35:40 +0200 Subject: [PATCH] =?UTF-8?q?feat(ci):=20workflow=20Gitea=20Actions=20Flutte?= =?UTF-8?q?r=20=E2=80=94=20test=20+=20build=20APK/AAB=20+=20Telegram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 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..2a73372 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,66 @@ +name: Flutter CI/CD — PluriWave + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + flutter-ci: + name: Test + Build + runs-on: macmini-flutter + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Flutter pub get + run: flutter pub get + + - name: Run tests + run: flutter test + + - name: Build APK (release) + run: flutter build apk --release + + - name: Build AppBundle (release) + run: flutter build appbundle --release + + - name: Upload APK artifact + uses: actions/upload-artifact@v4 + with: + name: pluriwave-apk-${{ gitea.sha }} + path: build/app/outputs/apk/release/app-release.apk + if-no-files-found: error + + - name: Upload AppBundle artifact + uses: actions/upload-artifact@v4 + with: + name: pluriwave-aab-${{ gitea.sha }} + path: build/app/outputs/bundle/release/app-release.aab + if-no-files-found: error + + - name: Notify Telegram — éxito + if: success() + run: | + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ + -d chat_id="${TELEGRAM_CHAT_ID}" \ + -d parse_mode="HTML" \ + -d text="✅ PluriWave CI OK%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${{ gitea.sha }}%0AAPKs subidos como artifacts en Gitea." + env: + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + + - name: Notify Telegram — fallo + if: failure() + run: | + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ + -d chat_id="${TELEGRAM_CHAT_ID}" \ + -d parse_mode="HTML" \ + -d text="❌ PluriWave CI FALLÓ%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${{ gitea.sha }}%0ARevisa el log en Gitea." + env: + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}