From 97faf7edd731ef811108c8fd66161714722eddf8 Mon Sep 17 00:00:00 2001 From: orianelou <126462046+orianelou@users.noreply.github.com> Date: Wed, 10 May 2023 13:48:05 +0300 Subject: [PATCH] Update build.yml added create release & add artifact --- .github/workflows/build.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 874a819..46b4990 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,14 +7,7 @@ jobs: steps: - uses: actions/checkout@v3 name: 'check out repository' - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - + - name: Build the agent run: | ./scripts/entry.sh agent ubuntu focal @@ -24,4 +17,26 @@ jobs: with: name: openappsec-focal.tar.gz path: output/ubuntu/focal/agent/openappsec-focal.tar.gz + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: 0.0.0 + release_name: test release with artifact + draft: true + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: output/ubuntu/focal/agent/openappsec-focal.tar.gz + asset_name: openappsec-focal.tar.gz + asset_content_type: application/x-tar