From fe994cdcca78ffbe9e9ad57d648bd466f2c446f0 Mon Sep 17 00:00:00 2001 From: Andrew Molchanov Date: Fri, 3 Sep 2021 16:23:51 +0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20GitHub=20Actions=20-=20=D0=97=D0=B0?= =?UTF-8?q?=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B2=20=D1=80=D0=B5=D0=BB=D0=B8=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/push.yml | 47 +++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9ec80948..55bb0772 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -52,31 +52,40 @@ jobs: if: startsWith(github.event.ref, 'refs/tags') run: echo "LAUNCHER_VERSION=$(echo ${{ github.event.ref }} | awk -F\/ '{print $3}')" >> $GITHUB_ENV + - name: Prebuild release files + if: startsWith(github.event.ref, 'refs/tags') + run: | + cp modules/*_module/build/libs/*.jar artifacts/modules || true + cp modules/*_lmodule/build/libs/*.jar artifacts/lmodules || true + cp modules/*_swmodule/build/libs/*.jar artifacts/swmodules || true + cd artifacts + zip -9 LauncherBase.zip libraries.zip LaunchServer.jar + cd lmodules + zip -9 ../LauncherModules.zip * + cd ../modules + zip -9 ../LaunchServerModules.zip * + cd ../swmodules + zip -9 ../ServerWrapperModules.zip * + cd .. + - name: Create release id: create_release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v1 if: startsWith(github.event.ref, 'refs/tags') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# Список настроек тута: https://github.com/softprops/action-gh-release#-customizing +# Можно сделать пуш описания релиза из файла with: - tag_name: ${{ github.ref }} release_name: GravitLauncher ${{ env.LAUNCHER_VERSION }} draft: false prerelease: false - - - name: Pack release - if: startsWith(github.event.ref, 'refs/tags') - run: | - cd artifacts/ - zip -r -9 ../Release.zip * - - - name: Upload release - if: startsWith(github.event.ref, 'refs/tags') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./Release.zip - asset_name: Release.zip - asset_content_type: application/zip + files: | + libraries.zip + LaunchServer.jar + ServerWrapper.jar + LauncherAuthlib.jar + LauncherModules.zip + LaunchServerModules.zip + ServerWrapperModules.zip + LauncherBase.zip