From 7645ef37447f4674004f5c0f8fbe8944dc00bb45 Mon Sep 17 00:00:00 2001 From: Ludovic DEHON Date: Sun, 15 May 2022 20:55:46 +0200 Subject: [PATCH] feat(cicd): create automatic release --- .github/workflows/main.yml | 57 ++++++-------------------------------- 1 file changed, 9 insertions(+), 48 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15e3c5006..f695259b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -98,56 +98,17 @@ jobs: with: package-dir: 'client/package.json' - - name: Create Release - id: create_release - uses: actions/create-release@latest + # GitHub Release + - name: Create GitHub release + uses: "marvinpinto/action-automatic-releases@latest" if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: true - prerelease: true - body: | - ${{ steps.changelog.outputs.changelog }} - - # Upload Jar / Tar / Zip - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./docker/app/akhq.jar - asset_name: akhq.jar - asset_content_type: application/java-archive - - - name: Upload Release Tar - id: upload-release-tar - uses: actions/upload-release-asset@v1 - if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/distributions/akhq.tar - asset_name: akhq.tar - asset_content_type: application/x-tar - - - name: Upload Release Zip - id: upload-release-zip - uses: actions/upload-release-asset@v1 - if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/distributions/akhq.zip - asset_name: akhq.zip - asset_content_type: application/zip + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + build/libs/*-all.jar + build/distributions/akhq-*.tar + build/distributions/akhq-*.zip # Docker - name: Set up QEMU