Description
I created a draft release via the action-gh-release.
As long as the release is still a draft, I can download the asset that were uploaded from the action-gh-release.
As soon as I publish the release, the download links are all broken, leading to 404 errors.
This is an example of such a broken link:
https://github.com/TheSlowGrowth/Wunderkiste/releases/download/refs%2Ftags%2Fv0.3/Wunderkiste.bin
This release was created with the script like this:
- name: Create Release Draft
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
draft: true
prerelease: false
fail_on_unmatched_files: true
files: |
./firmware/build/Wunderkiste/Wunderkiste.hex
./firmware/build/Wunderkiste/Wunderkiste.bin
./PCB_Files.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
I noticed that the broken download link contains %2F
characters which the draft-release didn't contain. They may be the reason for the 404. This is what a download link looks like BEFORE releasing the draft:
https://github.com/TheSlowGrowth/Wunderkiste/releases/download/untagged-[someCharacters]/Wunderkiste.bin
Making a release manually and uploading the files manually creates links that look different, like this:
https://github.com/TheSlowGrowth/Wunderkiste/releases/download/v0.3/Wunderkiste.bin
It seems to me as if the action-gh-release would internally use ${GITHUB_REF}
to generate the various URLs/asset names. Maybe the "/refs/tags/" string needs to be sanitized?