name: Deploy Client # Mirrors ~/code/jiu/.gitea/workflows/deploy-client.yml's tag→build→release→ # deploy shape, trimmed to the two platforms drafted so far (Android + # Windows — no client-web/macOS/iOS jobs; pangolin has no Flutter-web build # in this pipeline and macOS/iOS are a separate not-yet-drafted phase, see # docs/superpowers/plans/2026-07-05-cicd.md Phase 3). # # TODO(controller) — RUNNER AVAILABILITY: per docs/ci-runner.md, pangolin # currently has exactly ONE registered Gitea Actions runner # ("mac-pangolin-2", label `nas:host`). Neither `runs-on: mac` nor # `runs-on: windows` below has any runner registered to pick it up yet — this # workflow will queue forever until that's fixed. Options: (a) register # mac-pangolin-2 with an additional `mac` label (it's already a mac host — # cheapest fix for build-android/release-deploy) and separately stand up + # register an actual Windows host runner labeled `windows` for build-windows # (no such machine exists per docs/ci-runner.md), or (b) repoint both at # `nas` and accept that Android/Windows builds then compete with the # docker-in-domain nas jobs on the same single mac host. This mirrors the # `runs-on: mac` / `runs-on: windows` split already planned in # docs/superpowers/plans/2026-07-05-cicd.md Task 7/10 — written that way here # for fidelity to that plan, NOT because the runners are confirmed to exist. on: push: tags: - 'client-v[0-9]*.[0-9]*.[0-9]*' workflow_dispatch: concurrency: group: deploy-client cancel-in-progress: false jobs: build-android: runs-on: mac env: GOPROXY: https://goproxy.cn,direct PUB_HOSTED_URL: https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn steps: - name: Checkout uses: actions/checkout@v4 - name: Compile (Android APK) env: RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }} KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} run: bash scripts/ci/compile-android.sh "${{ gitea.ref_name }}" - name: Upload android artifact uses: actions/upload-artifact@v3 with: name: android path: dist/ build-windows: runs-on: windows env: GOPROXY: https://goproxy.cn,direct PUB_HOSTED_URL: https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn steps: - name: Checkout uses: actions/checkout@v4 - name: Compile (Windows installer) shell: bash run: bash scripts/ci/compile-windows.sh "${{ gitea.ref_name }}" - name: Upload windows artifact uses: actions/upload-artifact@v3 with: name: windows path: dist/ release-deploy: needs: [build-android, build-windows] runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 - name: Download android artifact uses: actions/download-artifact@v3 with: name: android path: dist/ - name: Download windows artifact uses: actions/download-artifact@v3 with: name: windows path: dist/ - name: Release → Forgejo env: FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} FORGEJO_URL: ${{ secrets.FORGEJO_URL }} run: bash scripts/ci/release-client.sh "${{ gitea.ref_name }}" - name: Deploy → pangolin1 (downloads/) env: DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} run: bash scripts/ci/deploy-client.sh "${{ gitea.ref_name }}" - name: Notify if: always() env: TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | . scripts/ci/notify.sh if [ "${{ job.status }}" = "success" ]; then notify_ok "client ${{ gitea.ref_name }} released + deployed" else notify_fail "client ${{ gitea.ref_name }} pipeline failed" fi