How robinraju/release-downloader works
Project type and purpose
• This is an open-source GitHub Action (a Node.js/TypeScript tool) whose sole purpose is to download assets from a GitHub release (public or private), optionally extract them, and expose metadata (tag_name, release_name, downloaded_files) as outputs.
File structure
• Top-level “action.yml” defines the Action’s inputs/outputs and entry point.
• “src/” contains TypeScript modules:
• input-helper.ts – reads and validates Action inputs
• download-settings.ts – builds a concrete settings object from inputs + defaults
• gh-api.ts – wraps GitHub REST API calls (fetch release by latest/tag/id)
• release-downloader.ts – downloads selected assets (wildcards, tarBall, zipBall)
• unarchive.ts – inspects downloaded files and extracts archives if requested
• main.ts – orchestrates the workflow
• “dist/” holds the compiled JavaScript version of the above modules (index.js) plus licenses.txt.
• Test fixtures in “__tests__” validate scenarios against sample JSON and asset files.
README for additional insights
• Confirms it’s a GitHub Action used in workflows via “uses: robinraju/release-downloader@v1”.
• Lists all configurable inputs and expected outputs (tag_name, etc.).
• Describes typical scenarios (latest release, specific tag, wildcard, extraction).
Additional Advice
• Make the orchestration flow (main.ts) prominent—this is your "backbone."
• Modules in a larger “Action code” container, distinct from the external GitHub API and the filesystem.