mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-20 18:33:20 +03:00
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.
This commit is contained in:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -69,17 +69,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: youtubedl-material
|
name: youtubedl-material
|
||||||
path: ${{runner.temp}}/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
|
- name: prepare release asset
|
||||||
shell: pwsh
|
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
|
- name: upload build asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: ./youtubedl-material-${{ github.ref }}.zip
|
asset_path: ./youtubedl-material-${{ steps.tag_name.outputs.tag_name }}.zip
|
||||||
asset_name: youtubedl-material-${{ github.ref }}.zip
|
asset_name: youtubedl-material-${{ steps.tag_name.outputs.tag_name }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
- name: upload docker-compose asset
|
- name: upload docker-compose asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user