Giter Club home page Giter Club logo

release-downloader's Introduction

Github Release Downloader

CI

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

Usage

- uses: robinraju/[email protected]
  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
    
    # The github tag. e.g: v1.0.1
    # Download assets from a specific tag/version
    tag: ""
    
    # 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
    # eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
    out-file-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: ""

Outputs 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}}

Scenarios

Download asset from the latest release in the current repository

- uses: robinraju/[email protected]
  with:
    latest: true
    fileName: "foo.zip"

Download asset from a specific release version.

- uses: robinraju/[email protected]
  with:
    repository: "owner/repo"
    tag: "v1.0.0"
    fileName: "foo.zip"

Download tarball and zipball

- uses: robinraju/[email protected]
  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/[email protected]
  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/[email protected]
  with:
    repository: "owner/repo"
    latest: true
    fileName: "*"

Download assets using wildcard pattern

- uses: robinraju/[email protected]
  with:
    repository: "owner/repo"
    latest: true
    fileName: "*.deb"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.