ci: drop main-branch trigger so merge commits don't re-run dev CI

Mirrors the same fix applied to the fabledassistant repo: merges to
main only happen after dev already passed CI and tagged releases are
the sole trigger for a signed APK build, so re-running analyze+test on
the merge commit just burns runner time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 07:55:55 -04:00
parent fa84e40efc
commit 51f1cffe79
+8 -3
View File
@@ -1,8 +1,13 @@
# CI runs first; build only proceeds if all checks pass.
#
# Push to dev or main: flutter analyze + flutter test
# Push to dev: flutter analyze + flutter test
# Tag v* (release): gates + signed APK build + attach to Forgejo Release
#
# main pushes are NOT gated here: a merge to main only happens after
# dev has already passed CI, and the release tag is the sole trigger
# for a signed APK build. Re-running analyze+test on the merge commit
# just burns runner time without changing the outcome.
#
# To cut a release:
# Create a release via the Forgejo UI on main with a v* tag name.
# The tag push triggers this workflow; the build job attaches the APK.
@@ -20,7 +25,7 @@ name: CI & Build
on:
push:
branches: [dev, main]
branches: [dev]
tags: ["v*"]
# Cancel older runs on the same branch when a newer push lands. Tag runs
@@ -63,7 +68,7 @@ jobs:
build:
name: Build release APK
needs: [analyze]
# Only tag pushes produce a signed release build. dev/main pushes
# Only tag pushes produce a signed release build. dev pushes
# run the gates above and stop there.
if: startsWith(github.ref, 'refs/tags/')
runs-on: ci-runner