@@ -23,15 +23,27 @@ runs:
23
23
shell : bash
24
24
run : |
25
25
set -e # Fail this Action if `gh release list` fails.
26
+
27
+ if [[ "$RUNNER_OS" == "Linux" ]]; then
28
+ artifact_name="codeql-bundle-linux64.tar.gz"
29
+ elif [[ "$RUNNER_OS" == "macOS" ]]; then
30
+ artifact_name="codeql-bundle-osx64.tar.gz"
31
+ elif [[ "$RUNNER_OS" == "Windows" ]]; then
32
+ artifact_name="codeql-bundle-win64.tar.gz"
33
+ else
34
+ echo "::error::Unrecognized OS $RUNNER_OS"
35
+ exit 1
36
+ fi
37
+
26
38
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
27
- export LATEST =`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
28
- echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST/codeql-bundle.tar.gz " >> $GITHUB_OUTPUT
39
+ tag =`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
40
+ echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name " >> $GITHUB_OUTPUT
29
41
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
30
- export VERSION =`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
31
- echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$VERSION -manual/codeql-bundle.tar.gz " >> $GITHUB_OUTPUT
42
+ version =`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
43
+ echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version -manual/$artifact_name " >> $GITHUB_OUTPUT
32
44
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
33
- export VERSION =`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
34
- echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$VERSION/codeql-bundle.tar.gz " >> $GITHUB_OUTPUT
45
+ version =`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
46
+ echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name " >> $GITHUB_OUTPUT
35
47
elif [[ ${{ inputs.version }} == "latest" ]]; then
36
48
echo "tools-url=latest" >> $GITHUB_OUTPUT
37
49
elif [[ ${{ inputs.version }} == "cached" ]]; then
0 commit comments