From 6ab4eb366aa532ce4ca68b851cbcd3695a16c305 Mon Sep 17 00:00:00 2001 From: Igor Artamonov Date: Thu, 9 Apr 2020 20:25:41 -0400 Subject: [PATCH] solution: upload dist to releases when created --- .github/workflows/publish.yaml | 35 ++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 76a2b646..7438f3e2 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,6 +1,10 @@ name: Publish -on: [release] +on: + release: + types: [created] + jobs: + publish-docker: runs-on: ubuntu-latest steps: @@ -20,4 +24,31 @@ jobs: with: arguments: jib -Platest=true env: - DOCKER_KEY: ${{ secrets.DOCKER_KEY }} \ No newline at end of file + DOCKER_KEY: ${{ secrets.DOCKER_KEY }} + + publish-github: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.ref }} + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Check + uses: eskatos/gradle-command-action@v1 + with: + arguments: check + - name: Build zip + uses: eskatos/gradle-command-action@v1 + with: + arguments: distZip + - name: Upload Release + id: upload-release-asset + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: ./build/distributions/*.zip + file_glob: true \ No newline at end of file