ITADN

bug(ci): artifact build never auto-triggers on release tags ([skip ci] + draftRelease)

#2443OpenSkrubbySkrubInAShrub 创建于 2026-05-31
## Summary `release-build.yaml` lists `push: tags: 'v*'` as a trigger, but it **never fires for a real release tag**. Every semantic-release tag sits on a `chore(release): X.Y.Z [skip ci]` commit, and GitHub skips workflow runs for a push whose head commit contains `[skip ci]` — including tag pushes. Combined with `draftRelease: true` (draft releases do **not** fire `release: created`), the **only** working triggers are `release: published` (a human publishing the draft) and manual `workflow_dispatch`. Net effect: RC and stable artifact builds **never auto-run on tag**. They sit idle until someone publishes the draft — which repeatedly looks like "the build is broken" when it's actually waiting by design. ## Evidence - `.releaserc.js` — `@semantic-release/git` commit message: `chore(release): ${nextRelease.version} [skip ci]` - `.releaserc.js` — `@semantic-release/github` has `draftRelease: true` - `.github/workflows/release-build.yaml` triggers: `push: tags: ['v*']`, `release: [created, published]`, `workflow_dispatch` - Observed on `v1.6.0-rc.1` and `v1.6.0`: tag created + draft release created, but **no build ran** until the draft was published. Both tags point at their `chore(release): … [skip ci]` commit, so the `push: tags` event was skipped. ## Impact - The `push: tags: 'v*'` trigger is **dead weight** — misleading to anyone reading the workflow, since it can never fire for a semantic-release tag. - The documented pipeline is **wrong**: the hotfix header comment in `release-hotfix.yaml` (and the wiki) says step 5 is *"release-build.yaml — auto build on tag, create draft release."* Builds do **not** happen on tag — they happen when the **draft is published** (`release: published`). - For **stable** releases, the **Nexus dry-run** job is also gated on `release: published`, so a manual `workflow_dispatch` build attaches artifacts but silently **skips Nexus** — easy to miss. - Operators rediscover this every release ("why didn't the artifact build?"). ## Proposed fixes (pick a combination) 1. **Auto-build the draft (restore the documented intent).** After semantic-release creates the tag/draft, have `release-semantic.yaml` (and the hotfix release path) explicitly kick the build, e.g.: ```bash gh workflow run release-build.yaml --ref "refs/tags/${TAG}" ``` so the draft is populated with artifacts automatically and a human only reviews + publishes. This matches the "auto-build on tag, create draft" docs. 2. **Drop the dead trigger.** Remove `push: tags: 'v*'` from `release-build.yaml` (or keep it but add a comment that it's a no-op for `[skip ci]` release tags), so the trigger list reflects reality. 3. **Fix the docs.** Update the `release-hotfix.yaml` pipeline comment and the wiki to state the real entry point: *the build runs when the draft release is published (`release: published`); manual `workflow_dispatch` on the tag is the fallback (and does not trigger the Nexus dry-run).* 4. **(If true tag-push builds are wanted)** Stop putting `[skip ci]` on the release commit — but this re-triggers CI on the release commit push, so option 1 is the safer way to get automatic draft artifacts. Recommended: **#1 + #3** (auto-dispatch the build after cutting the release, and correct the docs). #2 optional cleanup. ## Acceptance criteria - [ ] After cutting an RC or stable release, the artifact build runs without a human manually dispatching it (or the docs clearly state publishing the draft is the required step). - [ ] The trigger list in `release-build.yaml` matches actual behavior (no dead `push: tags` implication, or it's documented as a no-op). - [ ] `release-hotfix.yaml` pipeline comment + wiki describe the real build-on-publish flow, including that manual dispatch skips the Nexus dry-run. ## Context Discovered during the 1.6.0 release: both `v1.6.0-rc.1` and `v1.6.0` produced a draft release but no build, because each tag is on a `[skip ci]` release commit and `release: created` doesn't fire for drafts. Publishing the draft (or manual dispatch) was required to build artifacts.
0 条评论