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
+9 -4
View File
@@ -1,7 +1,12 @@
# CI runs first; build only proceeds if all checks pass. # 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 # 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: # To cut a release:
# Create a release via the Forgejo UI on main with a v* tag name. # Create a release via the Forgejo UI on main with a v* tag name.
@@ -20,7 +25,7 @@ name: CI & Build
on: on:
push: push:
branches: [dev, main] branches: [dev]
tags: ["v*"] tags: ["v*"]
# Cancel older runs on the same branch when a newer push lands. Tag runs # Cancel older runs on the same branch when a newer push lands. Tag runs
@@ -63,7 +68,7 @@ jobs:
build: build:
name: Build release APK name: Build release APK
needs: [analyze] 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. # run the gates above and stop there.
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
runs-on: ci-runner runs-on: ci-runner