Dtctl Release

dynatrace-oss/dtctl/.agents/skills/dtctl-release

作者 dynatrace-ossf4102b1712f2b6e7b3e2502c84799ff59ea3e801無授權條款195 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫今天更新

Explain and operate the dtctl release process, which is automated by release-please. Use this skill whenever the user says "release", "ship it", "cut a release", "new version", "bump version", "publish", or asks how dtctl releases work, why a release PR exists, or how to trigger/finish a release.

僅含說明DevOps & Cloud
AI 產生的概覽

說明並操作 dtctl 發佈流程,該流程由 release-please 自動化並需手動觸發。

功能
此技能說明 dtctl 的發佈方式:release-please 會根據 Conventional Commits 計算版本號與發佈說明,完整發佈需要兩次手動觸發工作流程,中間合併一次發佈 PR。內容涵蓋依提交類型決定版本號提升的規則、觸發工作流程、合併發佈 PR 與確認發佈的指令,以及選用的發佈說明潤飾。它也提供疑難排解指引與發佈檢查清單。
適用情境
當使用者提到 release、ship it、cut a release、new version、bump version 或 publish(針對 dtctl),或詢問 dtctl 發佈如何運作、為何存在發佈 PR、如何觸發或完成發佈時使用。
執行需求
僅為說明性內容,不附帶指令碼。需要存取 dtctl 儲存庫、具備執行工作流程與合併 PR 權限的 GitHub CLI(gh),以及該儲存庫的發佈工作流程與相關密鑰。

dtctl Release Process (release-please)

dtctl releases use release-please but are triggered manually — nothing releases on ordinary merges to main. There is no manual version bump, no CHANGELOG.md to edit, and no tag to push by hand. The release notes and version are computed from the Conventional Commits since the last release.

How it works

The .github/workflows/release.yml workflow runs only when you trigger it (workflow_dispatch — the "Run workflow" button on the Actions tab, or gh workflow run). A full release is two dispatches with a merge in between:

  1. Dispatch #1 — the release-please job inspects the conventional commits since the last release and opens/updates a release PR titled like chore(main): release 0.31.0. That PR:
    • bumps .release-please-manifest.json,
    • bumps the fallback version in pkg/version/version.go (via the // x-release-please-version annotation),
    • and contains the pending release notes (in the PR body).
  2. Merge the release PR once you're happy with the version + notes.
  3. Dispatch #2 — release-please detects the merged release PR, creates the git tag (vX.Y.Z) and the GitHub Release with generated notes, and release_created == true gates the goreleaser job, which builds cross-platform binaries, signs checksums with cosign, generates SBOMs with syft, attaches everything to the release (without overwriting the notes — release.mode: keep-existing), and pushes the updated Homebrew cask to dynatrace-oss/homebrew-tap.

⚠️ Don't forget Dispatch #2: merging the release PR alone does not publish anything, because the workflow only runs on manual dispatch.

There is no CHANGELOG.md file in the repo by design — the GitHub Release is the canonical changelog (skip-changelog: true in release-please-config.json).

Version bumps are determined by commit type

Commit prefixBump (pre-1.0)Example
feat:MINOR0.30.3 → 0.31.0
fix: / perf:PATCH0.30.3 → 0.30.4
feat!: / fix!: or BREAKING CHANGE: footerMINOR (pre-1.0)0.30.3 → 0.31.0
docs: / test: / chore: / ci: / refactor:no release on its own—

So the way to "control the version" is to write good conventional commits (see CONTRIBUTING.md). PRs are squash-merged, so the PR title becomes the release-relevant commit.

To cut a release

bash
# 1. Dispatch the workflow to build/update the release PR from commits since the last releasegh workflow run release.ymlgh run watch    # wait for the release-please run to finish
# 2. Review the proposed version + notes, then merge the release PRgh pr list --search "chore(main): release in:title" --state opengh pr merge <number> --squash
# 3. Dispatch AGAIN to create the tag + GitHub Release and publish artifactsgh workflow run release.ymlgh run watch
# 4. Confirmgh release view "$(gh release list --limit 1 --json tagName -q '.[0].tagName')"

The tag, GitHub Release, binaries, signatures, SBOMs, and Homebrew cask are produced by the second dispatch.

Polishing release notes (optional)

release-please generates notes grouped by commit type with PR links. They're good by default. If you want richer prose, edit the GitHub Release after it's published — GoReleaser uses keep-existing, so it won't clobber your edits:

bash
gh release edit vX.Y.Z --notes-file notes.md

Troubleshooting

  • No release PR appeared — did you dispatch the workflow? It does not run on merges; run gh workflow run release.yml. If it ran and still no PR, there are no releasable commits since the last release (only docs/chore/test/etc.), or a commit isn't a valid conventional commit. Check gh run list --workflow=release.yml.
  • Merged the release PR but nothing published — that's expected: dispatch the workflow a second time so release-please creates the tag/Release and GoReleaser runs.
  • Wrong version bump — caused by the commit types. To force a specific bump, use a Release-As: x.y.z footer in a commit on main.
  • Release created but no binaries — inspect the goreleaser job in the release workflow run; the release-please job must have output release_created: true for it to run.
  • Homebrew didn't update — check the HOMEBREW_TAP_APP_ID / HOMEBREW_TAP_APP_PRIVATE_KEY secrets and the GoReleaser step logs; skip_upload: auto intentionally skips pre-release tags.

Checklist

  1. All intended changes merged to main as conventional commits
  2. Dispatch #1: gh workflow run release.yml → release PR created/updated
  3. Open release PR reflects the expected version and notes
  4. Merge the release PR (squash)
  5. Dispatch #2: gh workflow run release.yml → tag + Release created
  6. release.yml run is green for both release-please and goreleaser jobs
  7. GitHub Release shows binaries, checksums, signatures, and SBOMs
  8. (Optional) Polished the release notes via gh release edit

來源與署名

來源:dynatrace-oss/dtctl位於.agents/skills/dtctl-release提交f4102b1

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架