4343 release_name : ${{ steps.version.outputs.release_name }}
4444 version : ${{ steps.version.outputs.version }}
4545
46- env :
47- PUBLISHABLE_PACKS_LIST : |
48- javascript/frameworks/cap/src
49- javascript/frameworks/cap/ext
50- javascript/frameworks/cap/lib
51- javascript/frameworks/ui5/src
52- javascript/frameworks/ui5/ext
53- javascript/frameworks/ui5/lib
54- javascript/frameworks/xsjs/src
55- javascript/frameworks/xsjs/ext
56- javascript/frameworks/xsjs/lib
57- javascript/heuristic-models/ext
58-
5946 steps :
6047 - name : CodeQL - Validate and parse version
6148 id : version
9178
9279 - name : CodeQL - Install pack dependencies
9380 shell : bash
94- run : |
95- chmod +x ./scripts/install-packs.sh
96- ./scripts/install-packs.sh
81+ run : ./scripts/install-packs.sh
9782
9883 - name : CodeQL - Validate version consistency
9984 run : |
@@ -106,50 +91,14 @@ jobs:
10691 if : inputs.publish_codeql_packs
10792 env :
10893 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
109- run : |
110- # Read the shared pack list from the job-level environment variable.
111- mapfile -t PUBLISHABLE_PACKS <<< "${PUBLISHABLE_PACKS_LIST}"
112-
113- echo "Publishing CodeQL packs..."
114- for pack_dir in "${PUBLISHABLE_PACKS[@]}"; do
115- if [ -d "${pack_dir}" ]; then
116- pack_name=$(grep -m1 "^name:" "${pack_dir}/qlpack.yml" | awk '{print $2}')
117- echo "📦 Publishing ${pack_name} from ${pack_dir}..."
118- echo "${GITHUB_TOKEN}" | codeql pack publish --github-auth-stdin --threads=-1 -- "${pack_dir}"
119- echo "✅ Published ${pack_name}"
120- else
121- echo "⚠️ Skipping: ${pack_dir} not found"
122- fi
123- done
94+ run : ./scripts/publish-packs.sh "${{ steps.version.outputs.release_name }}"
12495
12596 - name : CodeQL - Skip pack publishing
12697 if : ' !inputs.publish_codeql_packs'
12798 run : echo "⏭️ CodeQL pack publishing disabled via workflow input"
12899
129100 - name : CodeQL - Bundle CodeQL packs
130- run : |
131- mkdir -p dist-packs
132-
133- # Bundle all publishable packs
134- # Read the pack list from the environment into a Bash array.
135- # Each line in PUBLISHABLE_PACKS_LIST becomes one element.
136- mapfile -t PUBLISHABLE_PACKS <<< "${PUBLISHABLE_PACKS_LIST}"
137-
138- echo "Bundling CodeQL packs..."
139- for pack_dir in "${PUBLISHABLE_PACKS[@]}"; do
140- if [ -d "${pack_dir}" ]; then
141- pack_name=$(grep -m1 "^name:" "${pack_dir}/qlpack.yml" | awk '{print $2}')
142- # Convert pack name to filename: advanced-security/foo -> foo
143- bundle_name="${pack_name#advanced-security/}"
144- output="dist-packs/${bundle_name}.tar.gz"
145- echo "📦 Bundling ${pack_name} -> ${output}..."
146- codeql pack bundle --threads=-1 --output="${output}" -- "${pack_dir}"
147- echo "✅ Bundled ${bundle_name}"
148- fi
149- done
150- echo ""
151- echo "Bundled packs:"
152- ls -lh dist-packs/
101+ run : ./scripts/bundle-packs.sh --output-dir dist-packs
153102
154103 - name : CodeQL - Upload pack artifacts
155104 uses : actions/upload-artifact@v6
0 commit comments