Files
antigravity/.gitea/workflows/cd.yaml
T

32 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 用途:定義 CD(持續部署)工作流程,當 master 分支收到 push 時,執行「版本標籤釋出(release tag)」流程。
# 更新日期:2026/06/29 14:21:50
# 設定此 Gitea Actions workflow 的顯示名稱為 CD,方便在 Actions 工作流程清單中辨識。
name: CD
# 定義觸發此 workflow 的事件條件。
on:
# 監聽 push 事件:當有 commit 被推送到指定分支時觸發。
push:
# 指定只針對下列分支的 push 事件生效。
branches:
# 限定僅 master 分支被推送時才執行此 CD workflow(避免其他分支誤觸發釋出)。
- master
# 定義此 workflow 需要執行的所有 job。
jobs:
# 建立負責釋出並標註版本標籤的 jobjob id 為 release-tag-version。
release-tag-version:
# 設定此 job 在 Gitea Actions 介面中顯示的名稱。
name: Release Tag Version
# 指定此 job 使用 ubuntu runner 執行。
runs-on: ubuntu
# 定義此 job 內依序執行的步驟。
steps:
# 步驟:釋出並標註成品版本。
- name: 釋出並標註成品版本
# 呼叫共用的 composite action release-tag-version 來完成版本標籤釋出;
# 使用的 action 版本由 repository variable ACTION_RELEASE_TAG_VERSION 動態決定,
# 可在不改動本檔案的情況下集中切換所引用的 action 版本。
uses: https://gitea.jsc.idv.tw/composite-actions/release-tag-version@${{ vars.ACTION_RELEASE_TAG_VERSION }}