From 0094d5c1a8a2cbe4ec035b94cc938a89f344ce49 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 25 Mar 2020 13:53:21 +0000 Subject: [PATCH] attempt 2 at auto-release --- .github/workflows/release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4294e9cd4..789dc1a59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,16 @@ jobs: - name: Checkout code uses: actions/checkout@master + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} + - name: Build run: | composer install --no-dev cd .. - tar cvzf shimmie2-${{ github.ref }}.tgz shimmie2 - zip -r shimmie2-${{ github.ref }}.zip shimmie2 + tar cvzf shimmie2-${{ steps.get_version.outputs.VERSION }}.tgz shimmie2 + zip -r shimmie2-${{ steps.get_version.outputs.VERSION }}.zip shimmie2 - name: Create Release id: create_release @@ -27,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Shimmie ${{ github.ref }} + release_name: Shimmie ${{ steps.get_version.outputs.VERSION }} body: Automated release from tags draft: false prerelease: false @@ -39,8 +43,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ../shimmie2-${{ github.ref }}.zip - asset_name: shimmie2-${{ github.ref }}.zip + asset_path: ../shimmie2-${{ steps.get_version.outputs.VERSION }}.zip + asset_name: shimmie2-${{ steps.get_version.outputs.VERSION }}.zip asset_content_type: application/zip - name: Upload Tar @@ -50,6 +54,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ../shimmie2-${{ github.ref }}.tgz - asset_name: shimmie2-${{ github.ref }}.tgz + asset_path: ../shimmie2-${{ steps.get_version.outputs.VERSION }}.tgz + asset_name: shimmie2-${{ steps.get_version.outputs.VERSION }}.tgz asset_content_type: application/gzip