release-downloader

robinrajuMIT活跃维护

一个 GitHub Action,用于在 CI/CD 流水线中从公开或私有仓库下载 release 附件,省去手写脚本调用 API 的麻烦。

Github action to download release assets from private or public repositories

v1.13发布于 2026-04-20 21:57 UTC250star +3 / 7 天65fork同步于 2026-11-11 00:01 UTC

怎么上手

由 README 提炼,执行前请确认
- uses: robinraju/release-downloader@v1
  with:
    latest: true
    fileName: 'foo.zip'
硬件要求按 README 说明

README 未说明,作为 GitHub Action 在 GitHub 托管 runner 上运行,无需本地显存或 GPU

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在 GitHub Actions 里按需下载公开或私有仓库的 Release 资产

一个 GitHub Action,用于在 CI/CD 流水线中从公开或私有仓库下载 release 附件,省去手写脚本调用 API 的麻烦。

核心能力

  • 支持按 tag、releaseId 或 latest 指定目标版本
  • fileName 支持 * 与 *.deb 等通配符批量匹配
  • 可下载 tarBall 与 zipBall 并自动解压归档
  • 用 token 拉取私有仓库资产,支持 GitHub Enterprise API 地址
  • 输出 tag_name、release_name 与 downloaded_files 供后续步骤使用

容易踩的坑

下载私有仓库资产需自行传入 token(如 ${{ secrets.MY_TOKEN }}),否则会失败;preRelease 必须与 latest 一起使用才生效;extract 开启但文件不是 zip/tar/tar.gz 时只警告不报错,别误以为解压成功

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.13
  1. v1.13Release Downloader v1.13最新正式版2026-04-20 · 2026-04-20 21:57 UTC

    What's Changed

    New Contributors

    Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.12...v1.13

  2. v1.12Release Downloader v1.122025-03-06 · 2025-03-06 17:33 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/robinraju/release-downloader/compare/v1...v1.12

  3. v1.11Release Downloader v1.112024-06-28 · 2024-06-28 10:43 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.10...v1.11

  4. v1.10Release Downloader v1.102024-04-10 · 2024-04-10 11:18 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.9...v1.10

  5. v1.9Release Downloader v1.92024-01-27 · 2024-01-27 21:52 UTC
    查看更新说明

    What's Changed

    Dependancy Updates

    New Contributors

    Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.8...v1.9

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Github Release Downloader

    Build and Test

    A Github Action to download assets from Github release. It can download specified files from both private and public repositories.

    Usage

    - uses: robinraju/release-downloader@v1
      with:
        # The source repository path.
        # Expected format {owner}/{repo}
        # Default: ${{ github.repository }}
        repository: ''
    
        # A flag to set the download target as latest release
        # The default value is 'false'
        latest: true
    
        # A flag to download from prerelease. It should be combined with latest flag.
        # The default value is 'false'
        preRelease: true
    
        # The github tag. e.g: v1.0.1
        # Download assets from a specific tag/version
        tag: ''
    
        # The release id to download files from
        releaseId: ''
    
        # The name of the file to download.
        # Use this field only to specify filenames other than tarball or zipball, if any.
        # Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..)
        fileName: ''
    
        # Download the attached tarball (*.tar.gz)
        tarBall: true
    
        # Download the attached zipball (*.zip)
        zipBall: true
    
        # Relative path under $GITHUB_WORKSPACE to place the downloaded file(s)
        # It will create the target directory automatically if not present, defaults to root directory
        # eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
        out-file-path: ''
    
        # A flag to set if the downloaded assets are archives and should be extracted
        # Checks all downloaded files if they end with zip, tar or tar.gz and extracts them, if true.
        # Prints a warning if enabled but file is not an archive - but does not fail.
        extract: false
    
        # Relative path under $GITHUB_WORKSPACE to extract the downloaded file(s) if extract flag is set
        # Checks all downloaded files if they end with zip, tar or tar.gz and extracts them to this path if specified.
        # If not set it points to "out-file-path" directory.
        # eg: extract-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
        extract-path: ''
    
        # Github access token to download files from private repositories
        # https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
        # eg: token: ${{ secrets.MY_TOKEN }}
        token: ''
    
        # The URL of the Github API, only use this input if you are using Github Enterprise
        # Default: "https://api.github.com"
        # Use http(s)://[hostname]/api/v3 to access the API for GitHub Enterprise Server
        github-api-url: ''
    

    Output variables

    • tag_name it outputs the tag used to download a release.

    This variable can be used by other actions as an input as follows

    ${{steps.<step-id>.outputs.tag_name}}
    
    • release_name it outputs the name/title of the release

      It can be used as follows

      ${{steps.<step-id>.outputs.release_name}}
    
    • downloaded_files it outputs an array of downloaded files

      It can be used as follows

     ${{ fromJson(steps.<step-id>.outputs.downloaded_files)[0] }}
    

    Scenarios

    Download asset from the latest release in the current repository

    - uses: robinraju/release-downloader@v1
      with:
        latest: true
        fileName: 'foo.zip'
    

    Download asset from a specific release version

    - uses: robinraju/release-downloader@v1
      with:
        repository: 'owner/repo'
        tag: 'v1.0.0'
        fileName: 'foo.zip'
    

    Download tarball and zipball

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

    Remove the latest flag and specify tag if you want to download from a different release.

    Download multiple assets

    - uses: robinraju/release-downloader@v1
      with:
        repository: 'owner/repo'
        latest: true
        fileName: 'foo.zip'
        tarBall: true
        zipBall: true
    

    Download all assets if more than one files are available

    - uses: robinraju/release-downloader@v1
      with:
        repository: 'owner/repo'
        latest: true
        fileName: '*'
    

    Download assets using wildcard pattern

    - uses: robinraju/release-downloader@v1
      with:
        repository: 'owner/repo'
        latest: true
        fileName: '*.deb'
    

    Download a release using its id

    - uses: robinraju/release-downloader@v1
      with:
        releaseId: '123123'
        fileName: 'foo.zip'
    

    Download and extracts archives

    - uses: robinraju/release-downloader@v1
      with:
        fileName: 'foo.zip'
        latest: true
        extract: true
    

    Download latest prerelease

    - uses: robinraju/release-downloader@v1
      with:
        repository: 'owner/repo'
        fileName: 'foo.zip'
        latest: true
        preRelease: true
    

    Development notes

    dist/ is CI-managed for this repository. Pull requests should include source, tests, and workflow changes only; after a merge to main, GitHub Actions rebuilds dist/ and commits the generated bundle back to the branch.