下载私有仓库资产需自行传入 token(如 ${{ secrets.MY_TOKEN }}),否则会失败;preRelease 必须与 latest 一起使用才生效;extract 开启但文件不是 zip/tar/tar.gz 时只警告不报错,别误以为解压成功
release-downloader
robinrajuMIT活跃维护一个 GitHub Action,用于在 CI/CD 流水线中从公开或私有仓库下载 release 附件,省去手写脚本调用 API 的麻烦。
Github action to download release assets from private or public repositories
- uses: robinraju/release-downloader@v1
with:
latest: true
fileName: 'foo.zip'README 未说明,作为 GitHub Action 在 GitHub 托管 runner 上运行,无需本地显存或 GPU
在 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 供后续步骤使用
容易踩的坑
- v1.13Release Downloader v1.13最新正式版2026-04-20 · 2026-04-20 21:57 UTC
What's Changed
- chore: group dependendabot updates by @robinraju in https://github.com/robinraju/release-downloader/pull/905
- chore: dependency updates by @robinraju in https://github.com/robinraju/release-downloader/pull/906
- Upgrade action runtime to node 24 by @robinraju in https://github.com/robinraju/release-downloader/pull/907
- Await directory creation by @DavidS-ovm in https://github.com/robinraju/release-downloader/pull/902
- Add workflow to check if dist directory id up to date by @robinraju in https://github.com/robinraju/release-downloader/pull/908
- ci(mergify): upgrade configuration to current format by @mergify[bot] in https://github.com/robinraju/release-downloader/pull/918
- Improve error reporting by @DavidS-ovm in https://github.com/robinraju/release-downloader/pull/903
- Add more test coverage by @robinraju in https://github.com/robinraju/release-downloader/pull/920
- Split CI into separate worflows (pr validation + main branch builds) by @robinraju in https://github.com/robinraju/release-downloader/pull/921
- Build using CI and restrict commits by users by @robinraju in https://github.com/robinraju/release-downloader/pull/924
- Bump @types/node from 24.12.0 to 25.5.0 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/912
- Bump minimatch from 10.2.4 to 10.2.5 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/923
- Bump picomatch from 2.3.1 to 2.3.2 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/915
- Bump lodash from 4.17.23 to 4.18.1 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/922
- Bump tar from 7.5.12 to 7.5.13 in the npm-production group across 1 directory by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/925
- Bump eslint-plugin-jest from 28.11.0 to 29.15.0 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/914
- Bump brace-expansion from 1.1.12 to 1.1.13 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/916
- Bump the npm-development group across 1 directory with 8 updates by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/919
- Potential fix for code scanning alert no. 8: Workflow does not contain permissions by @robinraju in https://github.com/robinraju/release-downloader/pull/926
- Bump the npm-development group with 5 updates by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/928
- Bump eslint-plugin-github from 5.1.8 to 6.0.0 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/929
- Migrate to ESM by @robinraju in https://github.com/robinraju/release-downloader/pull/932
- Bump @actions/core from 1.11.1 to 3.0.0 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/913
- Bump typescript from 5.8.2 to 6.0.2 by @dependabot[bot] in https://github.com/robinraju/release-downloader/pull/931
- fix #729: Remove archive after extraction by @Wires77 in https://github.com/robinraju/release-downloader/pull/792
- Specify different extract path by @gnpaone in https://github.com/robinraju/release-downloader/pull/768
New Contributors
- @DavidS-ovm made their first contribution in https://github.com/robinraju/release-downloader/pull/902
- @mergify[bot] made their first contribution in https://github.com/robinraju/release-downloader/pull/918
- @Wires77 made their first contribution in https://github.com/robinraju/release-downloader/pull/792
- @gnpaone made their first contribution in https://github.com/robinraju/release-downloader/pull/768
Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.12...v1.13
- v1.12Release Downloader v1.122025-03-06 · 2025-03-06 17:33 UTC
查看更新说明
What's Changed
- Update README.md by @robinraju in https://github.com/robinraju/release-downloader/pull/745
- [Release management] - Move the major version tag (such as v1, v2) to point to the Git ref of the current release. by @robinraju in https://github.com/robinraju/release-downloader/pull/750
- Update README.md by @robinraju in https://github.com/robinraju/release-downloader/pull/751
- Bump eslint-plugin-github from 4.10.2 to 5.0.1 by @dependabot in https://github.com/robinraju/release-downloader/pull/748
- Bump minimatch from 9.0.4 to 9.0.5 in the npm-production group by @dependabot in https://github.com/robinraju/release-downloader/pull/747
- Bump the npm-development group with 4 updates by @dependabot in https://github.com/robinraju/release-downloader/pull/746
- Bump typed-rest-client from 2.0.1 to 2.0.2 in the npm-production group by @dependabot in https://github.com/robinraju/release-downloader/pull/756
- Bump the npm-development group with 4 updates by @dependabot in https://github.com/robinraju/release-downloader/pull/755
- Dependency updates by @robinraju in https://github.com/robinraju/release-downloader/pull/775
- Update dev dependencies by @robinraju in https://github.com/robinraju/release-downloader/pull/777
Full Changelog: https://github.com/robinraju/release-downloader/compare/v1...v1.12
- v1.11Release Downloader v1.112024-06-28 · 2024-06-28 10:43 UTC
查看更新说明
What's Changed
- Fix
No assets found in releaseerror by @robinraju in https://github.com/robinraju/release-downloader/pull/722 - Update project config and dependencies by @robinraju in https://github.com/robinraju/release-downloader/pull/723
- Bump @types/tar from 6.1.12 to 6.1.13 in the npm-development group by @dependabot in https://github.com/robinraju/release-downloader/pull/724
- Bump the npm-development group with 3 updates by @dependabot in https://github.com/robinraju/release-downloader/pull/725
- Bump the npm-development group across 1 directory with 4 updates by @dependabot in https://github.com/robinraju/release-downloader/pull/730
- Bump tar from 7.0.1 to 7.1.0 by @dependabot in https://github.com/robinraju/release-downloader/pull/727
- Bump the npm-development group across 1 directory with 7 updates by @dependabot in https://github.com/robinraju/release-downloader/pull/742
- Bump braces from 3.0.2 to 3.0.3 in the npm_and_yarn group by @dependabot in https://github.com/robinraju/release-downloader/pull/737
- Bump tar from 7.1.0 to 7.4.0 by @dependabot in https://github.com/robinraju/release-downloader/pull/741
- Bump typed-rest-client from 1.8.11 to 2.0.1 by @dependabot in https://github.com/robinraju/release-downloader/pull/744
Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.10...v1.11
- Fix
- v1.10Release Downloader v1.102024-04-10 · 2024-04-10 11:18 UTC
查看更新说明
What's Changed
- Update README.md by @robinraju in https://github.com/robinraju/release-downloader/pull/680
- Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/robinraju/release-downloader/pull/687
- Bump actions/setup-node from 3 to 4 by @dependabot in https://github.com/robinraju/release-downloader/pull/686
- Bump nock from 13.3.8 to 13.5.1 by @dependabot in https://github.com/robinraju/release-downloader/pull/685
- Bump @types/node from 20.11.8 to 20.11.10 by @dependabot in https://github.com/robinraju/release-downloader/pull/682
- Bump typescript from 5.0.4 to 5.3.3 by @dependabot in https://github.com/robinraju/release-downloader/pull/683
- Bump @vercel/ncc from 0.36.1 to 0.38.1 by @dependabot in https://github.com/robinraju/release-downloader/pull/684
- Bump eslint-plugin-prettier from 5.0.1 to 5.1.3 by @dependabot in https://github.com/robinraju/release-downloader/pull/681
- fix: change zip library to fix garbled extract file under node 20 by @jackie-linz in https://github.com/robinraju/release-downloader/pull/707
- Fix tests on windows, and package bundled js by @robinraju in https://github.com/robinraju/release-downloader/pull/710
- Bump undici from 5.27.2 to 5.28.4 by @dependabot in https://github.com/robinraju/release-downloader/pull/705
- Bump tar from 6.2.0 to 6.2.1 by @dependabot in https://github.com/robinraju/release-downloader/pull/711
- Grouped dependancy updates by @robinraju in https://github.com/robinraju/release-downloader/pull/713
New Contributors
- @jackie-linz made their first contribution in https://github.com/robinraju/release-downloader/pull/707
Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.9...v1.10
- v1.9Release Downloader v1.92024-01-27 · 2024-01-27 21:52 UTC
查看更新说明
What's Changed
- Correct minor typo in extract action input by @philostler in https://github.com/robinraju/release-downloader/pull/666
- Fix broken link to CI status badge on README by @robinraju in https://github.com/robinraju/release-downloader/pull/672
- Upgrade node runtime to v20 by @xelaris in https://github.com/robinraju/release-downloader/pull/673
- Add release name to output variable by @robinraju in https://github.com/robinraju/release-downloader/pull/677
- Throw error when a release with no assets are obtained by @robinraju in https://github.com/robinraju/release-downloader/pull/678
- Download latest pre-release by @robinraju in https://github.com/robinraju/release-downloader/pull/679
Dependancy Updates
- Update dependencies by @robinraju in https://github.com/robinraju/release-downloader/pull/671
- Bump @types/node from 20.9.4 to 20.11.8 by @dependabot in https://github.com/robinraju/release-downloader/pull/674
- Bump @typescript-eslint/parser from 6.12.0 to 6.19.1 by @dependabot in https://github.com/robinraju/release-downloader/pull/675
- Bump eslint from 8.54.0 to 8.56.0 by @dependabot in https://github.com/robinraju/release-downloader/pull/676
New Contributors
- @philostler made their first contribution in https://github.com/robinraju/release-downloader/pull/666
- @xelaris made their first contribution in https://github.com/robinraju/release-downloader/pull/673
Full Changelog: https://github.com/robinraju/release-downloader/compare/v1.8...v1.9
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Github Release Downloader
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_nameit 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_nameit outputs the name/title of the releaseIt can be used as follows
${{steps.<step-id>.outputs.release_name}}
-
downloaded_filesit outputs an array of downloaded filesIt 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
latestflag and specifytagif 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.