From ba9f5728b3e1bc096f2872ce6a35259914d2bdde Mon Sep 17 00:00:00 2001 From: cucadmuh <49571317+cucadmuh@users.noreply.github.com> Date: Wed, 29 Apr 2026 01:20:35 +0300 Subject: [PATCH] ci(release): always checkout next/release for channel publish (#353) workflow_dispatch previously used github.ref_name for source_ref, so running Next Channel from branch `next` loaded stale reusable workflows and could recreate the invalid `app-v` tag. Pin source_ref to the channel branch; document running manual workflows from `main` for latest publish YAML. --- .github/workflows/next.yml | 7 +++++-- .github/workflows/release.yml | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/next.yml b/.github/workflows/next.yml index 8551057a..63d8cbbd 100644 --- a/.github/workflows/next.yml +++ b/.github/workflows/next.yml @@ -2,6 +2,9 @@ name: Next Channel # Pushes made with the default GITHUB_TOKEN from another workflow (e.g. Promote main to next) # do not trigger push workflows — GitHub blocks recursive runs. Use workflow_run below. +# +# workflow_dispatch: set "Use workflow from branch" to `main` so reusable-channel-publish.yml +# is the latest (tag guards, etc.). The tree built for artifacts is always ref `next` below. on: push: branches: [next] @@ -16,8 +19,8 @@ jobs: uses: ./.github/workflows/reusable-channel-publish.yml with: channel: next - # workflow_run uses default-branch context; ref_name would be wrong — always build `next` - source_ref: ${{ github.event_name == 'workflow_run' && 'next' || github.ref_name }} + # Always build from channel branch; do not tie checkout to workflow_dispatch UI branch. + source_ref: next target_branch: next prerelease: true draft_release: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12b0af89..2932f138 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,8 @@ name: Release Channel # Same GITHUB_TOKEN push limitation as Next Channel (see next.yml). +# +# workflow_dispatch: use workflow from `main` for latest publish logic; checkout ref is always `release`. on: push: branches: [release] @@ -15,7 +17,7 @@ jobs: uses: ./.github/workflows/reusable-channel-publish.yml with: channel: release - source_ref: ${{ github.event_name == 'workflow_run' && 'release' || github.ref_name }} + source_ref: release target_branch: release prerelease: false draft_release: true