Files

33 lines
1.5 KiB
YAML
Raw Permalink 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 時執行版本標籤釋出流程。
# 更新日期:2026/06/29 16:11:33
# 設定此 Gitea Actions workflow 顯示名稱為 CD,方便在工作流程清單中辨識。
name: CD
# 定義觸發此 workflow 的事件條件。
on:
# 當程式碼被 push 到指定分支時觸發部署流程。
push:
# 指定只監聽下列分支的 push 事件。
branches:
# 限定 master 分支被推送時才執行 CD workflow(其他分支不觸發)。
- master
# 定義此 workflow 需要執行的所有 job。
jobs:
# 建立負責釋出版本標籤的 jobjob idrelease-tag-version)。
release-tag-version:
# 設定 job 在 Gitea Actions 介面中顯示的名稱。
name: Release Tag Version
# 指定此 job 使用 ubuntu runner 執行(runner labelubuntu)。
runs-on: ubuntu
# 定義此 job 內依序執行的步驟。
steps:
# 建立釋出並標註成品版本的步驟(step 顯示名稱)。
- name: 釋出並標註成品版本
# 呼叫共用 composite action 來執行釋出與打標籤;
# 版本(ref/tag)由 repository variable ACTION_RELEASE_TAG_VERSION 動態決定,
# 來源為 https://gitea.jsc.idv.tw/composite-actions/release-tag-version。
# 副作用:依該 composite action 行為對 repo 建立 / 推送版本標籤。
uses: https://gitea.jsc.idv.tw/composite-actions/release-tag-version@${{ vars.ACTION_RELEASE_TAG_VERSION }}