File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Bump Version and Create Release
22
3- # คำอธิบายการ bump version (ภาษาไทย)
4- #
5- # กฎการ bump:
6- # - Merge เข้า `main`:
7- # - ถ้า source branch ขึ้นต้นด้วย `fix/` หรือ `hotfix/` -> bump patch: vMAJOR.MINOR.(PATCH+1)
8- # - มิฉะนั้น -> bump minor: vMAJOR.(MINOR+1).0
9- # - Merge เข้า `development`:
10- # - สร้าง/เพิ่ม pre-release บนฐานเวอร์ชันปัจจุบัน: vMAJOR.MINOR.PATCH-dev.N
11- # - ถ้า source branch ขึ้นต้นด้วย `fix/` จะเพิ่ม suffix patch: vMAJOR.MINOR.PATCH-dev.N-patch.M
12- #
13- # วิธีตรวจหาเวอร์ชันปัจจุบัน:
14- # - จะตรวจ `git tags` ก่อน (รวม pre-release tags เช่น v0.2.0-dev.2)
15- # - ถ้าไม่มี tags จะ fallback ไปใช้ GitHub Releases API
16- # - ก่อนสร้าง tag ใหม่ workflow จะตรวจให้แน่ใจว่า tag นั้นยังว่างอยู่ (increment counters จนไม่ซ้ำ)
17- #
18- # หมายเหตุ:
19- # - เพื่อให้ workflow ทำงานถูกต้อง ควรมี tags ถูก push ขึ้น remote (หรือ workflow ต้องมีสิทธิ์ fetch tags)
20- # - หากต้องการทดสอบ locally ให้ clone repo และ `git fetch --tags` เพื่อให้มีข้อมูล tags ครบ
21-
223on :
234 pull_request :
245 types : closed
@@ -176,6 +157,7 @@ jobs:
176157
177158 - name : Create GitHub Release
178159 uses : softprops/action-gh-release@v2
160+ if : github.event.pull_request.base.ref == "main"
179161 env :
180162 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
181163 with :
Original file line number Diff line number Diff line change 1+ name : Deploy to Development Environment
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ deploy-development :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout Repository
13+ uses : actions/checkout@v3
14+
15+ - name : Notify Deployment Success
16+ run : echo "Deployment to development environment completed successfully."
You can’t perform that action at this time.
0 commit comments