File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change 11
2- name : Build and Publish Windows CodeQL queries
2+ name : Publish CodeQL Pack
33on :
44 workflow_dispatch :
55 inputs :
6- version :
6+ codeql- version :
77 description : ' CodeQL version to use'
88 required : true
99 type : string
10+ release-type :
11+ description : ' Publish as a pre-release'
12+ required : false
13+ type : choice
14+ options :
15+ - alpha
16+ - beta
17+
1018jobs :
1119 publish :
1220 runs-on : windows-latest
2634
2735 - name : CodeQL Download
2836 run :
29- Invoke-WebRequest -Uri "https://github.com/github/codeql-cli-binaries/releases/download/v${{ github.event.inputs.version }}/codeql-win64.zip" -OutFile codeql-win64.zip;
37+ Invoke-WebRequest -Uri "https://github.com/github/codeql-cli-binaries/releases/download/v${{ github.event.inputs.codeql- version }}/codeql-win64.zip" -OutFile codeql-win64.zip;
3038 Expand-Archive -Path codeql-win64.zip -DestinationPath .\codeql-zip -Force;
3139 Move-Item -Path .\codeql-zip\codeql -Destination .\codeql-cli\
3240
4048 shell : pwsh
4149 env :
4250 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43- run :
44- .\codeql-cli\codeql.cmd pack publish ./src;
51+ run : |
52+ if ("${{ github.event.inputs.release-type }}" -ne "") {
53+ $version =( Select-String .\src\qlpack.yml -Pattern "version").line;
54+ $new_ver = "$version-${{ github.event.inputs.release-type }}";
55+ (Get-Content .\src\qlpack.yml).Replace($version, $new_ver) | Set-Content .\src\qlpack.yml;
56+ .\codeql-cli\codeql.cmd pack publish --allow-prerelease ./src;
57+ } else {
58+ .\codeql-cli\codeql.cmd pack publish ./src
59+ }
You can’t perform that action at this time.
0 commit comments