@sleighmaster/bmad 1.5.5 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,99 @@
1
+ # Release to Public Repository
2
+ # Private 저장소에서 v* 태그 push 시 Public 저장소에 릴리스 생성
3
+ #
4
+ # 필요 Secrets:
5
+ # PUBLIC_REPO_TOKEN - Public 저장소에 대한 Fine-grained PAT
6
+ # (Contents: Read and write)
7
+ #
8
+ # Generated by BMAD Method - Public Release Setup
9
+
10
+ name: Release to Public
11
+
12
+ on:
13
+ push:
14
+ tags:
15
+ - 'v*'
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ release-to-public:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - name: Checkout source
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Setup runtime
30
+ uses: __SETUP_ACTION__
31
+ with:
32
+ __SETUP_WITH__
33
+
34
+ - name: Install dependencies
35
+ run: __INSTALL_CMD__
36
+
37
+ - name: Build
38
+ run: __BUILD_CMD__
39
+
40
+ - name: Extract version from tag
41
+ id: version
42
+ run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
43
+
44
+ - name: Extract changelog for current version
45
+ id: changelog
46
+ run: |
47
+ # CHANGELOG.md에서 현재 버전 섹션 추출
48
+ VERSION="${{ steps.version.outputs.version }}"
49
+ NOTES=$(awk -v ver="$VERSION" '
50
+ /^## \[/ {
51
+ if (found) exit
52
+ if (index($0, ver)) found=1
53
+ next
54
+ }
55
+ found { print }
56
+ ' CHANGELOG.md)
57
+
58
+ if [ -z "$NOTES" ]; then
59
+ NOTES="Release ${GITHUB_REF_NAME}"
60
+ fi
61
+
62
+ # multiline output
63
+ {
64
+ echo "notes<<EOF"
65
+ echo "$NOTES"
66
+ echo "EOF"
67
+ } >> "$GITHUB_OUTPUT"
68
+
69
+ - name: Create release on public repo
70
+ uses: softprops/action-gh-release@v2
71
+ with:
72
+ repository: __PUBLIC_REPO__
73
+ token: ${{ secrets.PUBLIC_REPO_TOKEN }}
74
+ tag_name: ${{ github.ref_name }}
75
+ name: ${{ github.ref_name }}
76
+ body: ${{ steps.changelog.outputs.notes }}
77
+ files: |
78
+ __ARTIFACT_PATTERNS__
79
+
80
+ - name: Sync CHANGELOG to public repo
81
+ env:
82
+ GH_TOKEN: ${{ secrets.PUBLIC_REPO_TOKEN }}
83
+ run: |
84
+ git clone "https://x-access-token:${GH_TOKEN}@github.com/__PUBLIC_REPO__.git" _public_repo
85
+ cp CHANGELOG.md _public_repo/CHANGELOG.md
86
+ cd _public_repo
87
+
88
+ git config user.name "github-actions[bot]"
89
+ git config user.email "github-actions[bot]@users.noreply.github.com"
90
+
91
+ # 변경사항이 있을 때만 커밋
92
+ if git diff --quiet CHANGELOG.md; then
93
+ echo "CHANGELOG.md is already up to date"
94
+ else
95
+ git add CHANGELOG.md
96
+ git commit -m "docs: CHANGELOG.md 동기화 (${{ github.ref_name }})"
97
+ git push origin main
98
+ echo "CHANGELOG.md synced successfully"
99
+ fi