release-downloader icon indicating copy to clipboard operation
release-downloader copied to clipboard

Failing to run latest when fileName is not `release.tar.gz`

Open i-am-the-slime opened this issue 2 years ago • 5 comments

Describe the bug I have a monorepo and just added another workflow for a different app. I made sure to tag its releases as ai-annotator-release.tar.gz.

To Reproduce This are the two steps in question. The first one only runs when input is not latest and it works. The second one is copy pasted and does not work. In another action the same thing does work and the only difference I can see is that:

  • I have fileName: "ai-annotator-release.tar.gz
    steps:
      # THIS STEP WORKS
      - name: Download specific release
        if: "${{ github.event.inputs.version != 'latest' }}"
        uses: robinraju/[email protected]
        with:
          repository: ${{ github.repository }}
          fileName: "ai-annotator-release.tar.gz"
          token: ${{ secrets.GITHUB_TOKEN }}
          tag: ${{ github.event.inputs.version }}

      - name: Download latest release
        # THIS STEP FAILS 
        if: "${{ github.event.inputs.version == 'latest' }}"
        uses: robinraju/[email protected]
        with:
          repository: ${{ github.repository }}
          fileName: "ai-annotator-release.tar.gz"
          token: ${{ secrets.GITHUB_TOKEN }}
          latest: true

Expected behavior It should

Screenshots image

Action Environment (please complete the following information):

  • OS: ubuntu-latest

Additional context I'm not sure this is actually a bug or if I'm doing something wrong.

i-am-the-slime avatar Feb 15 '23 08:02 i-am-the-slime

Are you still facing this error? Can you check if your release is not marked as a pre-release/draft.

robinraju avatar Apr 26 '23 19:04 robinraju

Yes, this is still a problem. The lastest version does not respect the file name as far as I can tell:

It finds ai-annotator... as the latest release (which is true for the repository), but it should be the latest release for this particular name. I'm not sure that's even possible, to be honest.

Found latest release version: ai-annotator-2023-04-26|14-40
Error: Asset with name release.tar.gz not found!

It downloads the globally latest version (this is the step):

      - name: Download latest release
        if: "${{ github.event.inputs.version == 'latest-website' }}"
        uses: robinraju/[email protected]
        with:
          repository: ${{ github.repository }}
          fileName: "release.tar.gz"
          token: ${{ secrets.GITHUB_TOKEN }}
          latest: true

i-am-the-slime avatar May 02 '23 14:05 i-am-the-slime

please reopen, if this issue persists with the latest version

robinraju avatar Jan 27 '24 22:01 robinraju

This still doesn't work for me. Not sure how to reopen.

i-am-the-slime avatar Jan 31 '24 14:01 i-am-the-slime

@robinraju

i-am-the-slime avatar Apr 30 '24 13:04 i-am-the-slime