From d8d1c0388112e8aa28f9916cb88f0dbcc4b7f4e7 Mon Sep 17 00:00:00 2001 From: andreykropotov Date: Wed, 5 Aug 2026 12:39:40 +0400 Subject: [PATCH] fix(ci): tag from whatever branch the repo calls its trunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy.yaml fired on a hardcoded `master`, so it never ran in the personaclick mirror, whose default branch is `main` — no tag was ever pushed there and publish.yaml, which triggers on tags, never got a chance to publish. `on:` cannot express this: it takes literal branch names and does not evaluate ${{ }}. So the workflow now starts on any branch push and the trunk check moves into the job, where expressions do work. Pushes to other branches start the run and stop at the `if`, which GitHub reports as conclusion "skipped" — not "success" — so sync.yaml's workflow_run gate stays untouched. Tag pushes are excluded by '**', which matches branches only. --- .github/workflows/deploy.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 921d348..59c169e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -2,8 +2,13 @@ name: Deploy on: push: + # Which branch is the trunk is decided in the job below, not here: `on:` takes + # literal branch names and never evaluates ${{ }}, so a hardcoded `master` + # silently never fires in the personaclick mirror, whose trunk is `main`. + # '**' matches every branch while still keeping tag pushes out of this + # workflow — those belong to publish.yaml. branches: - - master + - '**' workflow_dispatch: # Auto-tags a release when the pubspec version is new. The tag is pushed with a @@ -16,8 +21,12 @@ jobs: name: Tag release on version bump runs-on: ubuntu-latest - # Publish/tag only from the canonical repository owner. - if: github.repository_owner == 'rees46' + # Tag only from the canonical repository owner, and only for a push to that + # repository's own default branch — `master` here, `main` in the mirror. + # Every other branch push starts this workflow and stops on this line. + if: | + github.repository_owner == 'rees46' && + github.ref_name == github.event.repository.default_branch steps: # Self-activates once VERSIONER_ID / VERSIONER_SECRET are set.