Skip to content

fix(release): release job 放行 skipped 依赖 - #1647

Merged
DeliciousBuding merged 1 commit into
masterfrom
fix/release-skip-mobile
Aug 6, 2026
Merged

fix(release): release job 放行 skipped 依赖#1647
DeliciousBuding merged 1 commit into
masterfrom
fix/release-skip-mobile

Conversation

@DeliciousBuding

@DeliciousBuding DeliciousBuding commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • build-mobileRELEASE_MOBILE_ENABLED 未启用时跳过,GitHub Actions 的 needs 依赖被跳过时下游默认跳过 → rc.5 产物齐全但 release job 被 skip、未发版
  • 修复:release job 加 if: !cancelled() && !contains(needs.*.result, 'failure'),放行 skipped、仍拦截 failure

Test plan

  • release-readiness CI
  • v0.6.0 正式 tag 触发后 release job 正常运行

Summary by CodeRabbit

  • Bug Fixes
    • Release workflows now proceed when optional mobile builds are skipped, provided all required checks pass.

build-mobile 在 RELEASE_MOBILE_ENABLED 未启用时跳过,needs 依赖被跳过
使 release job 也默认跳过(rc.5 已证实产物齐全但未发版)。加
if: !cancelled() && !contains(needs.*.result, 'failure'):放行 skipped、
仍拦截 failure 与取消。
Copilot AI lite review requested due to automatic review settings August 6, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release job now runs when dependencies are skipped, but not when a dependency fails or the workflow is cancelled.

Changes

Release workflow

Layer / File(s) Summary
Release job execution condition
.github/workflows/release.yml
The release job condition permits skipped dependencies, blocks failed dependencies, and prevents execution after workflow cancellation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the release job change that allows skipped dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-skip-mobile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 351-353: Condition the mobile artifact download step on
build-mobile completing successfully by adding an if expression using
needs.build-mobile.result == 'success'. Keep the release job’s existing failure
and cancellation gating unchanged, while ensuring skipped build-mobile does not
attempt the download.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5aadc128-021f-4aba-a8f1-1bab99447fa5

📥 Commits

Reviewing files that changed from the base of the PR and between 1944f30 and 059fac6.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment on lines +351 to +353
# build-mobile 未启用时(RELEASE_MOBILE_ENABLED != true)会 skipped,
# needs 依赖被跳过会使下游默认跳过;显式放行 skipped、仍拦截 failure。
if: ${{ !cancelled() && !contains(needs.*.result, 'failure') }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow outline/relevant lines =="
wc -l .github/workflows/release.yml
sed -n '310,410p' .github/workflows/release.yml

echo
echo "== search for build-mobile / mobile-artifacts / release_mobile_enabled =="
rg -n "build-mobile|mobile-artifacts|RELEASE_MOBILE_ENABLED|download-artifact|upload-artifact" .github/workflows/release.yml

echo
echo "== run yaml parse check if available =="
python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/release.yml')
if p.exists():
    text = p.read_text()
    print("file exists and length:", len(text.splitlines()))
else:
    print("missing")
PY

Repository: TokenDanceLab/AgentHub

Length of output: 3817


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow outline/relevant lines =="
wc -l .github/workflows/release.yml
sed -n '310,410p' .github/workflows/release.yml

echo
echo "== search for build-mobile / mobile-artifacts / release_mobile_enabled =="
rg -n "build-mobile|mobile-artifacts|RELEASE_MOBILE_ENABLED|download-artifact|upload-artifact" .github/workflows/release.yml

echo
echo "== run yaml parse check if available =="
python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/release.yml')
if p.exists():
    text = p.read_text()
<<<<<<< HEAD
    print("file exists and length:", len(text.splitlines()))
=======
    print("file exists and length:", len(text.splitlines()))
>>>>>>> release
PY

Repository: TokenDanceLab/AgentHub

Length of output: 3865


🌐 Web query:

actions/download-artifact v8 missing artifact error job fails not skipped

💡 Result:

The "Artifact not found" error when using actions/download-artifact@v8 typically indicates that the action cannot locate the specified artifact within the context of the current repository and run ID [1][2]. Because the job fails (instead of skipping), this confirms that the action is actively searching and failing to find the resource, rather than the step being logically skipped [3][4]. To resolve this, ensure the following configurations are met: 1. Verify Version Compatibility: Ensure that you are using actions/upload-artifact@v4 (or newer) to upload the artifact. The v4+ versions of upload/download actions use a different storage mechanism than older versions, and they are not cross-compatible [5][6]. 2. Check Permissions for Cross-Workflow Downloads: If you are downloading an artifact from a different workflow run (e.g., in a workflow_run trigger), the action requires specific permissions. You must add the following to your workflow file [1]: permissions: actions: read contents: read 3. Explicitly Define Inputs for Cross-Workflow Runs: When downloading from a different run, the action often requires explicit definition of the github-token, repository, and run-id, even if they match the defaults [1][2]. - name: Download Artifact uses: actions/download-artifact@v8 with: name: your-artifact-name github-token: ${{ github.token }} run-id: ${{ github.event.workflow_run.id }} repository: ${{ github.repository }} 4. Artifact Availability: Ensure the artifact has not expired [3][7]. Additionally, some users have noted that artifacts may not be immediately available if a job is part of a large matrix or if the upload step has not fully completed/flushed to the storage backend before the download step begins [8]. If the job fails without a clear error message (sometimes seen on Windows runners), it may be due to underlying Node.js crashes rather than a configuration error [4]. In such cases, check the debug logs (by setting ACTIONS_STEP_DEBUG=true in your secrets) to identify potential stack buffer overflows or environment-specific failures [4].

Citations:


为可选移动端构建条件化 artifact 下载。

RELEASE_MOBILE_ENABLED != 'true' 时,build-mobile 不会上传 mobile-artifactsrelease 仍会执行,继续下载该 artifact 会失败。请在下载步骤添加 if: ${{ needs.build-mobile.result == 'success' }},或让条件不允许跳过 build-mobile 时进入 release。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 351 - 353, Condition the mobile
artifact download step on build-mobile completing successfully by adding an if
expression using needs.build-mobile.result == 'success'. Keep the release job’s
existing failure and cancellation gating unchanged, while ensuring skipped
build-mobile does not attempt the download.

Source: MCP tools

@DeliciousBuding
DeliciousBuding merged commit 10eb62c into master Aug 6, 2026
29 checks passed
@DeliciousBuding
DeliciousBuding deleted the fix/release-skip-mobile branch August 6, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants