From a6dd0e5a0f2a8362e4e3c5d7fc90a28a94b9243e Mon Sep 17 00:00:00 2001 From: Daniel Sagi Date: Sun, 6 Dec 2020 16:55:20 +0200 Subject: [PATCH] changed ubuntu to an older version, for compatibility reasons with glibc on pyinstaller steps and added a step to parse the release tag --- .github/workflows/release.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 313d110..aac08b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ name: Upload Release Asset jobs: build: name: Upload Release Asset - runs-on: ubuntu-latest + runs-on: ubuntu-16.04 steps: - name: Checkout code uses: actions/checkout@v2 @@ -39,7 +39,17 @@ jobs: release_name: Release ${{ github.ref }} draft: false prerelease: false - + + # Beacause we can't easily parse the github.ref using github actions syntax, we extract it with an extra step + # Example: + # before - refs.tags.v0.3.1 + # after - v0.3.1 + - name: Parse Release Tag + - id: parse_release + run: | + release_tag=$(echo "refs.tags.v0.3.1" | sed -e "s/^refs.tags.//") + echo "::set-output name=release_tag::$release_tag" + - name: Upload Release Asset id: upload-release-asset uses: actions/upload-release-asset@v1 @@ -48,5 +58,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./dist/kube-hunter - asset_name: kube-hunter-linux-x86_64-${{ github.ref }} + asset_name: kube-hunter-linux-x86_64-${{ steps.parse_release.outputs.release_tag }} asset_content_type: application/octet-stream \ No newline at end of file