Upload the runner to the release directly

This commit is contained in:
Robin Neatherway 2020-10-20 10:55:42 +01:00
parent ffaa8aa197
commit d91d2d2873

View file

@ -4,31 +4,45 @@ on:
push: push:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
bundle-tag:
description: 'Tag of the bundle release (e.g., "codeql-bundle-20200826")'
required: true
jobs: jobs:
build-runner: build-runner:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
RELEASE_TAG: test-build-runner # "${{ github.event.inputs.bundle-tag }}"
strategy:
matrix:
extension: ["linux", "macos", "win.exe"]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build runner - name: Resolve Upload URL for the release
run: | id: save_url
cd runner run: |
npm install UPLOAD_URL=$(curl -sS \
npm run build-runner "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${RELEASE_TAG}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | jq .upload_url | sed s/\"//g)
echo ${UPLOAD_URL}
echo "::set-output name=upload_url::${UPLOAD_URL}"
- uses: actions/upload-artifact@v2 - name: Build runner
with: run: |
name: codeql-runner-linux cd runner
path: runner/dist/codeql-runner-linux npm install
npm run build-runner
- uses: actions/upload-artifact@v2 - name: Upload Platform Package
with: uses: actions/upload-release-asset@v1
name: codeql-runner-macos env:
path: runner/dist/codeql-runner-macos GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- uses: actions/upload-artifact@v2 upload_url: ${{ steps.save_url.outputs.upload_url }}
with: asset_path: runner/dist/codeql-runner-${{matrix.extension}}
name: codeql-runner-win.exe asset_name: codeql-runner-${{matrix.extension}}
path: runner/dist/codeql-runner-win.exe asset_content_type: application/octet-stream