Skip to content

Commit d5789a1

Browse files
data-douserCopilot
andauthored
Add advanced-security/ql-mcp-*-tools-src query pack archives as uploaded release artifacts (#41)
* Initial plan * Enable auto-creation of tags in release workflow for workflow_dispatch Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> * More fixes for release workflow * Add CodeQL query packs as uploaded release artifacts --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 314261e commit d5789a1

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,30 @@ jobs:
123123
fi
124124
done
125125
126+
- name: Release - Bundle CodeQL tool query packs
127+
run: |
128+
mkdir -p dist-packs
129+
LANGUAGES="actions cpp csharp go java javascript python ruby swift"
130+
echo "Bundling CodeQL tool query packs..."
131+
for lang in ${LANGUAGES}; do
132+
PACK_DIR="server/ql/${lang}/tools/src"
133+
if [ -d "${PACK_DIR}" ]; then
134+
PACK_NAME="ql-mcp-${lang}-tools-src"
135+
OUTPUT="dist-packs/${PACK_NAME}.tar.gz"
136+
echo "📦 Bundling ${PACK_DIR} -> ${OUTPUT}..."
137+
codeql pack bundle --threads=-1 --output="${OUTPUT}" -- "${PACK_DIR}"
138+
echo "✅ Bundled ${PACK_NAME}"
139+
fi
140+
done
141+
echo "Bundled packs:"
142+
ls -lh dist-packs/
143+
144+
- name: Release - Upload CodeQL pack artifacts
145+
uses: actions/upload-artifact@v6
146+
with:
147+
name: codeql-tool-query-packs-${{ steps.version.outputs.version }}
148+
path: dist-packs/*.tar.gz
149+
126150
- name: Release - Publish npm package
127151
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
128152
working-directory: server
@@ -173,7 +197,9 @@ jobs:
173197
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
174198
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
175199
with:
176-
files: codeql-development-mcp-server-${{ steps.version.outputs.version }}.tar.gz
200+
files: |
201+
codeql-development-mcp-server-${{ steps.version.outputs.version }}.tar.gz
202+
dist-packs/*.tar.gz
177203
generate_release_notes: true
178204
tag_name: ${{ steps.version.outputs.version }}
179205

@@ -186,6 +212,7 @@ jobs:
186212
echo "✅ Distribution package created" >> $GITHUB_STEP_SUMMARY
187213
echo "✅ Production dependencies installed" >> $GITHUB_STEP_SUMMARY
188214
echo "✅ Archive created: codeql-development-mcp-server-${{ steps.version.outputs.version }}.tar.gz" >> $GITHUB_STEP_SUMMARY
215+
echo "✅ CodeQL tool query pack archives bundled" >> $GITHUB_STEP_SUMMARY
189216
echo "" >> $GITHUB_STEP_SUMMARY
190217
echo "### Package Contents" >> $GITHUB_STEP_SUMMARY
191218
echo "- \`server/dist/\` - Bundled JavaScript output" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)