From 6f2f7bee1334614f698777a5d492ae152380defb Mon Sep 17 00:00:00 2001 From: Andrew Molchanov Date: Wed, 1 Sep 2021 00:25:40 +0300 Subject: [PATCH 1/2] [FIX] GitHub Actions --- .github/workflows/push.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a2a04688..23fbe706 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,5 @@ name: push -on: - push: +on: push jobs: launcher: name: Launcher @@ -49,26 +48,30 @@ jobs: name: Launcher path: artifacts + - name: Get version value, set to env + if: startsWith(github.event.ref, 'refs/tags') + run: echo "LAUNCHER_VERSION=v$(awk -F\' '/version =/ {print $2}' build.gradle)" >> $GITHUB_ENV + - name: Create release id: create_release uses: actions/create-release@v1 - if: github.event.ref == 'refs/tags/*' + if: startsWith(github.event.ref, 'refs/tags') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: GravitLauncher ${{ github.ref }} + release_name: GravitLauncher ${{ env.LAUNCHER_VERSION }} draft: false prerelease: false - name: Pack release - if: github.event.ref == 'refs/tags/*' + if: startsWith(github.event.ref, 'refs/tags') run: | cd artifacts/ zip -r -9 ../Release.zip * - name: Upload release - if: github.event.ref == 'refs/tags/*' + if: startsWith(github.event.ref, 'refs/tags') uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b424da0d62a4c9f9086045cc0f08a5366473c611 Mon Sep 17 00:00:00 2001 From: Andrew Molchanov Date: Wed, 1 Sep 2021 13:49:54 +0300 Subject: [PATCH 2/2] =?UTF-8?q?[FIX]=20GitHub=20Actions=20-=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=81=D0=B8=D0=B8=20=D0=B8=D0=B7=20=D1=82=D0=B5=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 23fbe706..9ec80948 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -50,7 +50,7 @@ jobs: - name: Get version value, set to env if: startsWith(github.event.ref, 'refs/tags') - run: echo "LAUNCHER_VERSION=v$(awk -F\' '/version =/ {print $2}' build.gradle)" >> $GITHUB_ENV + run: echo "LAUNCHER_VERSION=$(echo ${{ github.event.ref }} | awk -F\/ '{print $3}')" >> $GITHUB_ENV - name: Create release id: create_release