8
8
required : true
9
9
10
10
permissions :
11
- contents : read
11
+ contents : write
12
12
13
13
jobs :
14
14
build-and-publish :
60
60
- name : 📦 Install vsce
61
61
run : npm install -g @vscode/vsce
62
62
63
+ - name : 📦 Install GitHub CLI
64
+ run : sudo apt-get install gh -y
65
+
63
66
- name : 🔧 Install
64
67
run : npm ci
65
68
@@ -82,12 +85,65 @@ jobs:
82
85
working-directory : packages/extester-runner
83
86
run : vsce publish --pat ${{ secrets.VSCODE_TOKEN }} --packagePath extester-runner-${{ steps.version.outputs.VERSION }}.vsix
84
87
88
+ - name : 📣 Add summary
89
+ run : |
90
+ echo "### ✅ Published \`extester-runner-${{ steps.version.outputs.VERSION }}.vsix\` to Marketplace" >> $GITHUB_STEP_SUMMARY
91
+
85
92
- name : 💾 Upload VSIX
86
93
uses : actions/upload-artifact@v4
87
94
with :
88
95
name : extester-runner-${{ steps.version.outputs.VERSION }}.vsix
89
96
path : " packages/extester-runner/extester-runner-${{ steps.version.outputs.VERSION }}.vsix"
90
97
91
- - name : 📣 Add summary
98
+ - name : 📝 Generate changelog
99
+ id : changelog
92
100
run : |
93
- echo "### ✅ Published \`extester-runner-${{ steps.version.outputs.VERSION }}.vsix\` to Marketplace" >> $GITHUB_STEP_SUMMARY
101
+ TAG=${{ github.event.inputs.tag }}
102
+ VERSION=${TAG#runner-v}
103
+ PREV_TAG=$(git tag --list "runner-v*" --sort=-creatordate | grep -v "$TAG" | head -n 1)
104
+
105
+ echo "Comparing changes from $PREV_TAG to $TAG in packages/extester-runner"
106
+
107
+ git fetch --unshallow || true
108
+
109
+ LOG=$(git log "$PREV_TAG..$TAG" -- packages/extester-runner --pretty=format:'%s (%h)')
110
+
111
+ format_section() {
112
+ local pattern="$1"
113
+ local title="$2"
114
+ local content=$(echo "$LOG" | grep -iE "^$pattern" || true)
115
+ if [[ -n "$content" ]]; then
116
+ echo "### $title"
117
+ echo "$content"
118
+ echo ""
119
+ fi
120
+ }
121
+
122
+ echo "changelog<<EOF" >> $GITHUB_OUTPUT
123
+
124
+ format_section 'feat|feature' "🚀 Features"
125
+ format_section 'fix' "🚫 Bugs"
126
+ format_section 'test' "🔎 Tests"
127
+ format_section 'chore|refactor|internal' "🔧 Maintenance"
128
+ format_section 'deps|dependencies' "📦 Dependencies"
129
+
130
+ # Catch-all for anything else
131
+ OTHER=$(echo "$LOG" | grep -vE '^(feat|feature|fix|test|chore|refactor|internal|deps|dependencies)' || true)
132
+ if [[ -n "$OTHER" ]]; then
133
+ echo "### 🧼 Other Changes"
134
+ echo "$OTHER"
135
+ echo ""
136
+ fi
137
+
138
+ echo "EOF" >> $GITHUB_OUTPUT
139
+
140
+ - name : 🚀 Publish GitHub Release with VSIX
141
+ env :
142
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
143
+ working-directory : packages/extester-runner
144
+ run : |
145
+ TAG=${{ github.event.inputs.tag }}
146
+ gh release create "$TAG" --clobber \
147
+ --title "ExTester Runner v${{ steps.version.outputs.VERSION }}" \
148
+ --notes "${{ steps.changelog.outputs.changelog }}" \
149
+ "extester-runner-${{ steps.version.outputs.VERSION }}.vsix"
0 commit comments