Agent Skills › UniClipboard/UniClipboard › trigger-prepare-release

trigger-prepare-release

GitHub

在 GitHub Actions 中触发 prepare-release 工作流,支持指定版本、增量类型、发布通道及基准分支,用于生成包含 PR 的发布分支。

.agents/skills/trigger-prepare-release/SKILL.md UniClipboard/UniClipboard

Trigger Scenarios

需要创建新版本或发布候选版本 执行自动化发布流程

Install

npx skills add UniClipboard/UniClipboard --skill trigger-prepare-release -g -y
More Options

Non-standard path

npx skills add https://github.com/UniClipboard/UniClipboard/tree/v1/.agents/skills/trigger-prepare-release -g -y

Use without installing

npx skills use UniClipboard/UniClipboard@trigger-prepare-release

指定 Agent (Claude Code)

npx skills add UniClipboard/UniClipboard --skill trigger-prepare-release -a claude-code -g -y

安装 repo 全部 skill

npx skills add UniClipboard/UniClipboard --all -g -y

预览 repo 内 skill

npx skills add UniClipboard/UniClipboard --list

SKILL.md

Frontmatter
{
    "name": "trigger-prepare-release",
    "description": "Trigger the prepare-release workflow on GitHub Actions. Supports optional arguments for version, bump type, channel, and base branch. Defaults to bump=patch, channel=stable, base_branch=v1."
}

Trigger Prepare Release

Trigger the prepare-release.yml workflow on GitHub Actions.

The workflow produces a release/v<version> branch + PR. By default it bases the release off v1, but the base_branch input lets you base it off (and target the PR at) any branch — see Choosing base_branch.

Arguments

All arguments are optional.

Parameter Default Description
version (empty) Exact semver, no v prefix. Include the channel suffix if you want one (e.g. 0.9.0-alpha.1). Overrides bump AND channel.
bump patch Version bump type: patch, minor, major. Only used when version is empty.
channel stable Release channel: stable, alpha, beta, rc. Only used when version is empty.
base_branch v1 Branch the release is checked out from and the branch the PR targets. Use release/vX.Y.Z when iterating prereleases on a release branch whose commits are not yet merged back to v1.

Critical: how version interacts with channel

The workflow's Determine version step is:

if [ -n "$version" ]; then
  VERSION="$version"        # used verbatim, channel ignored
else
  VERSION=$(bump-version.js --type "$bump" --channel "$channel" --dry-run ...)
fi

So:

  • ✅ version=0.9.0-alpha.1 → release v0.9.0-alpha.1 (correct way to ship an alpha at an exact version)
  • ❌ version=0.9.0 + channel=alpha → release v0.9.0 (channel silently ignored, this is the trap)
  • ✅ bump=minor + channel=alpha → script computes next alpha (e.g. v0.9.0-alpha.1)

Choosing base_branch

base_branch controls two things at once: the branch the release is checked out from, and the branch the resulting PR targets (--base).

  • v1 (default) — the normal case: cut a release off the v1 branch.
  • release/vX.Y.Z — iterating prereleases on a release branch whose commits are NOT yet merged back to v1. The workflow checks out that branch (so the release includes its un-merged commits) and opens the PR back against it. Example: you committed fixes onto release/v0.14.1 and want the next alpha to include them without first merging to v1.

Two things to verify before triggering with a non-default base_branch:

  • The branch must be pushed. The workflow checks out the remote origin/<base_branch>, so anything still local-only won't be in the release. Confirm git status -sb shows the branch in sync (not ahead) before triggering.
  • Version is computed from that branch. The Determine version dry-run runs against base_branch's package.json, so the resolved version reflects that branch, not v1. The created branch is always named release/v<resolved-version> regardless of base_branch.

Workflow

1. Parse arguments

Accept either key=value form (channel=beta bump=minor) or positional tokens (/trigger-prepare-release 0.9.0-alpha.1). For each positional token, classify by shape:

Token shape Classified as Examples
Looks like semver (digit-dot-digit, optional -suffix.N) version 0.9.0, 0.9.0-alpha.1, 1.2.3-rc.2
One of stable / alpha / beta / rc (bare word) channel alpha, rc
One of patch / minor / major bump minor

base_branch is never inferred from a positional token (a branch name like release/v0.14.1 is too free-form to classify safely) — accept it only via the explicit base_branch=<branch> form.

Ambiguity rule: if the user supplies a semver-shaped token AND a bare channel word (e.g. 0.9.0 alpha.1 or 0.9.0 alpha), do NOT split them across version/channel — that triggers the trap above. Instead, ask the user whether they meant:

  • version=0.9.0-alpha.1 (exact version with suffix), or
  • bump=minor channel=alpha (let the script compute the next alpha)

2. Confirm with user

Display the resolved parameters and ask for confirmation before triggering:

Will trigger prepare-release with:
  version:     0.9.0-alpha.1
  bump:        (ignored — version is set)
  channel:     (ignored — version is set)
  base_branch: v1
Proceed? (y/n)

If version is empty, show resolved bump and channel instead. Always show base_branch — and when it is not v1, restate the resolved version so the user can confirm it was computed from the intended branch.

3. Trigger the workflow

gh workflow run prepare-release.yml \
  --repo UniClipboard/UniClipboard \
  --ref v1 \
  -f version=<version> \
  -f bump=<bump> \
  -f channel=<channel> \
  -f base_branch=<base_branch>

Omit -f version= when version is empty. Omit -f base_branch= to default to v1.

--ref vs base_branch — don't confuse them:

  • --ref v1 selects which copy of the workflow file to run. Keep it v1: it's the default branch, so GitHub validates the dispatch inputs against v1's workflow definition. (Both v1 and the release branches carry the base_branch input, so this is safe.)
  • base_branch is what actually controls which branch the release is based on and where the PR is targeted. --ref does not affect that.

(Older versions of this skill claimed the workflow "always checks out main regardless" — that is no longer true; base_branch is honored.)

4. Confirm dispatch

After triggering, wait a few seconds and show the latest run:

gh run list --repo UniClipboard/UniClipboard --workflow=prepare-release.yml --limit 1

Report the run URL so the user can monitor progress.

To verify the version came out as intended, do not rely on the run name: it is prepare-release-v${version || bump}, so when version is empty it shows the bump type (e.g. prepare-release-vpatch), not the resolved version. Instead check the Determine version step's log, or the PR it opens — the PR title is release: v<resolved-version> and its body states the base branch.

Version History

  • c6483d7 Current 2026-11-13 18:21

Same Skill Collection

.agents/skills/babysit-pr/SKILL.md
.agents/skills/beui/SKILL.md
.agents/skills/continue-task/SKILL.md
.agents/skills/create-formal-verification-skill/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/cross-device-diagnose/SKILL.md
.agents/skills/design-audit/SKILL.md
.agents/skills/dual-side-debug/SKILL.md
.agents/skills/dual-side-sync/SKILL.md
.agents/skills/e2e-test-thinker/SKILL.md
.agents/skills/error-diagnose-fix/SKILL.md
.agents/skills/gen-changelog/SKILL.md
.agents/skills/learn/SKILL.md
.agents/skills/plan-reviewer/SKILL.md
.agents/skills/pr-evidence/SKILL.md
.agents/skills/pr-greenlight/SKILL.md
.agents/skills/react-doctor/SKILL.md
.agents/skills/refresh-agents/SKILL.md
.agents/skills/research-then-implement/SKILL.md
.agents/skills/review-strict/SKILL.md
.agents/skills/skill-evolve/SKILL.md
.agents/skills/statechart/SKILL.md
.agents/skills/systematic-debugging/SKILL.md
.agents/skills/tracing-best-practices/SKILL.md
.agents/skills/ui-iteration/SKILL.md
.agents/skills/verify-receive-reply-fence/SKILL.md
.agents/skills/wrap/SKILL.md
.claude/skills/gui-user-review/SKILL.md
.agents/skills/ios-log-diagnose/SKILL.md
.agents/skills/local-log-debug/SKILL.md

Metadata

Files
0
Version
c6483d7
Hash
f367efaa
Indexed
2026-11-13 18:21

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-14 02:44
浙ICP备14020137号-1