Skip to content

Commit

Permalink
Upload the runner to the release directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Neatherway committed Oct 20, 2020
1 parent ffaa8aa commit d91d2d2
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions .github/workflows/build-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,45 @@ on:
push:
workflow_dispatch:
inputs:
bundle-tag:
description: 'Tag of the bundle release (e.g., "codeql-bundle-20200826")'
required: true

jobs:
build-runner:
runs-on: ubuntu-latest
env:
RELEASE_TAG: test-build-runner # "${{ github.event.inputs.bundle-tag }}"

steps:
- uses: actions/checkout@v2
strategy:
matrix:
extension: ["linux", "macos", "win.exe"]

- name: Build runner
run: |
cd runner
npm install
npm run build-runner
steps:
- uses: actions/checkout@v2

- uses: actions/upload-artifact@v2
with:
name: codeql-runner-linux
path: runner/dist/codeql-runner-linux
- name: Resolve Upload URL for the release
id: save_url
run: |
UPLOAD_URL=$(curl -sS \
"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
with:
name: codeql-runner-macos
path: runner/dist/codeql-runner-macos
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- uses: actions/upload-artifact@v2
with:
name: codeql-runner-win.exe
path: runner/dist/codeql-runner-win.exe
- name: Upload Platform Package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.save_url.outputs.upload_url }}
asset_path: runner/dist/codeql-runner-${{matrix.extension}}
asset_name: codeql-runner-${{matrix.extension}}
asset_content_type: application/octet-stream

0 comments on commit d91d2d2

Please sign in to comment.