From 4f07d23dd65e3e8ce99c7c0d47d12ba9d59f484f Mon Sep 17 00:00:00 2001 From: Ben Hirschberg Date: Sun, 3 Oct 2021 21:50:35 +0300 Subject: [PATCH] moving to post release --- .github/workflows/build.yaml | 32 ++++++++--------------------- .github/workflows/post-release.yaml | 17 +++++++++++++++ 2 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/post-release.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f2b20b73..fa70583c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -46,29 +46,13 @@ jobs: CGO_ENABLED: 0 run: mkdir -p build/${{ matrix.os }} && go mod tidy && go build -ldflags "-w -s -X github.com/armosec/kubescape/cmd.BuildNumber=$RELEASE -X github.com/armosec/kubescape/cautils/getter.ArmoBEURL=$ArmoBEServer -X github.com/armosec/kubescape/cautils/getter.ArmoERURL=$ArmoERServer -X github.com/armosec/kubescape/cautils/getter.ArmoFEURL=$ArmoWebsite" -o build/${{ matrix.os }}/kubescape - - name: Digest - uses: MCJack123/ghaction-generate-release-hashes@v1 - with: - hash-type: sha1 - file-name: build/${{ matrix.os }}/kubescape.sha1 - -# - name: Upload Release binaries -# id: upload-release-asset -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# upload_url: ${{ needs.once.outputs.upload_url }} -# asset_path: build/${{ matrix.os }}/kubescape -# asset_name: kubescape-${{ matrix.os }} -# asset_content_type: application/octet-stream - - name: Upload Release binaries - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - token: ${{ secrets.GITHUB_TOKEN }} - files: | - build/${{ matrix.os }}/kubescape - build/${{ matrix.os }}/kubescape.sha1 - \ No newline at end of file + upload_url: ${{ needs.once.outputs.upload_url }} + asset_path: build/${{ matrix.os }}/kubescape + asset_name: kubescape-${{ matrix.os }} + asset_content_type: application/octet-stream diff --git a/.github/workflows/post-release.yaml b/.github/workflows/post-release.yaml new file mode 100644 index 00000000..3afe6539 --- /dev/null +++ b/.github/workflows/post-release.yaml @@ -0,0 +1,17 @@ +name: create release digests + +on: + release: + types: [ published] + branches: [ master ] + +jobs: + once: + name: Creating digests + runs-on: ubuntu-latest + steps: + - name: Digest + uses: MCJack123/ghaction-generate-release-hashes@v1 + with: + hash-type: sha1 + file-name: kubescape-release-digests