robinraju / release-downloader

Github action to download release assets from private or public repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No assets found in release

Vaishno23 opened this issue · comments

Hi@robinraju

I used the release-downloader and get the latest version. The problem and error appearing is: Error: there are no assets found.
The problem is, there are assets. Is there a solution for this?

Note - with version 1.8, it works.

  • name: Dummy Release
    uses: robinraju/release-downloader@v1.9
    with:
    tag: ${{ xyx 'latest' }} # If tag is not provided, default to 'latest'
    fileName: "*.zip"
    token: ${{ xyx }}
    latest: true # Always set to true to download the latest release if tag is not provided or is invalid
    tarBall: true
    zipBall: true
    repository: xyx

image

This error happens when you specify a file name and it couldn't find that asset.

The flags tarBall: true and zipBall:true will download both of the following files, which are available in all releases.
Source code (zip)
Source code (tar.gz)

The fileName input is used when you have any additional files apart from these two,
Otherwise you can remove the fileName: "*.zip" part.

Let me know if you are trying to download a different .zip file available in the release and see this error.

Thanks much for your respond Robinraju.
I do not want to download a different .zip file.
I removed the fileName: "*.zip" from my file but i am getting the same error again.

Here is my workflow.

on:
push:
branches:
- xyz
workflow_dispatch:
inputs:
tag:
description: 'Specify the tag of the release to download, or leave empty for the latest release'
required: false

jobs:
download-release:
name: Dummy Release with tag input
runs-on: ubuntu-latest

steps:
    
  - name: Dummy Release with tag input
    uses: robinraju/release-downloader@v1.9
    with:
      tag: ${{ xyz || 'latest' }}  # If tag is not provided, default to 'latest'
      token: ${{ xyz }}
      latest: true  # Always set to true to download the latest release if tag is not provided or is invalid
      tarBall: true
      zipBall: true
      repository: xyz

here is the error.

image

Same error here

- name: Download release
  if: env.DEPLOY_TYPE == 'release'
  uses: robinraju/release-downloader@c39a3b234af58f0cf85888573d361fb6fa281534
  with:
      repository: ${{ github.repository }}
      token: ${{ secrets.GITHUB_TOKEN }}
      tag: ${{ inputs.branchOrRelease }}

Captura de pantalla 2024-04-22 144908

Have you found any solution @Vaishno23 ?

@mcfdez Not yet, Still waiting for @robinraju to respond.

Looks like a bug in the downloader when it tries to resolve various assets based on the user input.
I just reproduced it here:

The downloader always look for an asset by its name. That shouldn't be the case if you just want to download a zipBall or tarBall only.

I'll fix it soon.

A fix for this is merged now, you may test it using the latest commit hash on main branch as follows.

- uses: robinraju/release-downloader@cb096d8fa1fcb0e897f30b1c571f07e2c8e12479
  with:
    repository: "owner/repo"
    latest: true
    tarBall: true
    zipBall: true