File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release runner
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ bundle-tag :
7+ description : ' Tag of the bundle release (e.g., "codeql-bundle-20200826")'
8+ required : false
9+
10+ jobs :
11+ release-runner :
12+ runs-on : ubuntu-latest
13+ env :
14+ RELEASE_TAG : " ${{ github.event.inputs.bundle-tag }}"
15+
16+ strategy :
17+ matrix :
18+ extension : ["linux", "macos", "win.exe"]
19+
20+ steps :
21+ - uses : actions/checkout@v2
22+
23+ - name : Build runner
24+ run : |
25+ cd runner
26+ npm install
27+ npm run build-runner
28+
29+ - uses : actions/upload-artifact@v2
30+ with :
31+ name : codeql-runner-${{matrix.extension}}
32+ path : runner/dist/codeql-runner-${{matrix.extension}}
33+
34+ - name : Resolve Upload URL for the release
35+ if : ${{ github.event.inputs.bundle-tag != null }}
36+ id : save_url
37+ run : |
38+ UPLOAD_URL=$(curl -sS \
39+ "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${RELEASE_TAG}" \
40+ -H "Accept: application/json" \
41+ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | jq .upload_url | sed s/\"//g)
42+ echo ${UPLOAD_URL}
43+ echo "::set-output name=upload_url::${UPLOAD_URL}"
44+
45+ - name : Upload Platform Package
46+ if : ${{ github.event.inputs.bundle-tag != null }}
47+ uses : actions/upload-release-asset@v1
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ with :
51+ upload_url : ${{ steps.save_url.outputs.upload_url }}
52+ asset_path : runner/dist/codeql-runner-${{matrix.extension}}
53+ asset_name : codeql-runner-${{matrix.extension}}
54+ asset_content_type : application/octet-stream
You can’t perform that action at this time.
0 commit comments