From b0cb09309d67a8f4bc33437b33b70f47d2210d51 Mon Sep 17 00:00:00 2001 From: Florian Gabsteiger Date: Fri, 25 Dec 2020 18:21:05 +0100 Subject: [PATCH] Fix release asset name creation The complete git ref name was used as part of the release asset filename for tagged commits. This includes the refs/tags prefix, which fails as "/" characters can't be part of filenames. To work around this, a step is added that extracts the pure tag name first. --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9eb71be..db12f7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,17 +69,20 @@ jobs: with: name: youtubedl-material path: ${{runner.temp}}/youtubedl-material + - name: extract tag name + id: tag_name + run: echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/} - name: prepare release asset shell: pwsh - run: Compress-Archive -Path ${{runner.temp}}/youtubedl-material -DestinationPath youtubedl-material-${{ github.ref }}.zip + run: Compress-Archive -Path ${{runner.temp}}/youtubedl-material -DestinationPath youtubedl-material-${{ steps.tag_name.outputs.tag_name }}.zip - name: upload build asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./youtubedl-material-${{ github.ref }}.zip - asset_name: youtubedl-material-${{ github.ref }}.zip + asset_path: ./youtubedl-material-${{ steps.tag_name.outputs.tag_name }}.zip + asset_name: youtubedl-material-${{ steps.tag_name.outputs.tag_name }}.zip asset_content_type: application/zip - name: upload docker-compose asset uses: actions/upload-release-asset@v1