chore(#322): upload build artifacts + build on dev pushes

Two diagnostics faults from #313, fixed together:

1. Dead push trigger. build.yml and flutter_dart.yml declared
   `push: branches: [main]`, but no `main` branch exists in this
   repo (default is `dev`), so the push half of every trigger had
   never fired. Nothing built on merge. Added `dev` to both; `main`
   is created separately after this merges.

2. No artifacts. All six platform jobs stopped at `flutter build`,
   so every binary CI produced was discarded with the runner. Added
   actions/upload-artifact to the four jobs that produce something
   installable or servable:

     android  build/app/outputs/flutter-apk/app-release.apk
     windows  build/windows/x64/runner/Release/
     linux    build/linux/x64/release/bundle/
     web      build/web/

   ios and macos are compile checks only and upload nothing: ios is
   built --no-codesign so it is not installable, and macos is kept
   as a compile check per the owner's decision on #321.

Artifacts carry run number + commit SHA so a build traces back to a
commit, and use if-no-files-found: error so a wrong path fails loudly
rather than silently publishing an empty artifact.

Android artifacts are debug-signed for now; real signing is Phase 5.
The web artifact is the plain `flutter build web` output, not the
build_pipe versioned build used for deploys; Phase 4 addresses that.

Part of epic #312, plan #321 (Phase 1, owner-approved).
main
Strycher 2 days ago
parent 7dd0e2b633
commit 8ea5ede1dc

@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev
pull_request:
jobs:
@ -30,6 +31,13 @@ jobs:
${{ runner.os }}-gradle-
- run: flutter pub get
- run: flutter build apk --release --no-pub
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: offband-android-r${{ github.run_number }}-${{ github.sha }}
path: build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error
retention-days: 14
ios:
runs-on: macos-latest
@ -54,6 +62,13 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
- run: flutter pub get
- run: flutter build linux --release --no-pub
- name: Upload Linux bundle
uses: actions/upload-artifact@v4
with:
name: offband-linux-r${{ github.run_number }}-${{ github.sha }}
path: build/linux/x64/release/bundle/
if-no-files-found: error
retention-days: 14
macos:
runs-on: macos-latest
@ -76,6 +91,13 @@ jobs:
cache: true
- run: flutter pub get
- run: flutter build web --release --no-pub
- name: Upload web build
uses: actions/upload-artifact@v4
with:
name: offband-web-r${{ github.run_number }}-${{ github.sha }}
path: build/web/
if-no-files-found: error
retention-days: 14
windows:
runs-on: windows-latest
@ -87,3 +109,10 @@ jobs:
cache: true
- run: flutter pub get
- run: flutter build windows --release --no-pub
- name: Upload Windows build
uses: actions/upload-artifact@v4
with:
name: offband-windows-r${{ github.run_number }}-${{ github.sha }}
path: build/windows/x64/runner/Release/
if-no-files-found: error
retention-days: 14

@ -5,6 +5,7 @@ on:
push:
branches:
- main
- dev
jobs:
analyze:

Loading…
Cancel
Save

Powered by TurnKey Linux.