GithubHelp home page GithubHelp logo

isabella232 / fetch-gh-release-asset Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zendesk/fetch-gh-release-asset

0.0 0.0 0.0 301 KB

Github Action to download an asset from a Github release

License: MIT License

TypeScript 100.00%

fetch-gh-release-asset's Introduction

Fetch GH Release Asset

This action downloads an asset from a GitHub release and provides some release details as output. Private repos are supported.

Inputs

file

Required The name of the file to be downloaded.

repo

The org/repo containing the release. Defaults to the current repo.

token

The GitHub token. Defaults to ${{ secrets.GITHUB_TOKEN }}

version

The release version to fetch from in the form tags/<tag_name> or <release_id>. Defaults to latest.

target

Target file path. Only supports paths to subdirectories of the GitHub Actions workspace directory.

regex

Boolean indicating if file is to be interpreted as regular expression. Defaults to false.

octokitBaseUrl

The Github API base URL. Useful if you are using Github Enterprise.

Outputs

version

The version number of the release tag. Can be used to deploy for example to itch.io

name

Also called a title of a release. Defaults to the same value as version if not specified when creating a release.

body

The body (description) of a release.

Example usage

Save a single asset as a new file <workspace>/plague-linux.zip:

uses: dsaltares/fetch-gh-release-asset@master
with:
  repo: 'dsaltares/godot-wild-jam-18'
  version: 'tags/v0.1.18'
  file: 'plague-linux.zip'
  token: ${{ secrets.GITHUB_TOKEN }}

Save a single asset as a new file <workspace>/subdir/plague-linux.zip:

uses: dsaltares/fetch-gh-release-asset@master
with:
  repo: 'dsaltares/godot-wild-jam-18'
  version: 'tags/v0.1.18'
  file: 'plague-linux.zip'
  target: 'subdir/plague-linux.zip'
  token: ${{ secrets.GITHUB_TOKEN }}

Save a range of assets as new files in directory <workspace>:

uses: dsaltares/fetch-gh-release-asset@master
with:
  repo: 'dsaltares/godot-wild-jam-18'
  version: 'tags/v0.1.18'
  regex: true
  file: "plague-.*\\.zip"
  token: ${{ secrets.GITHUB_TOKEN }}

Save a range of assets as new files in directory <workspace>/subdir:

uses: dsaltares/fetch-gh-release-asset@master
with:
  repo: 'dsaltares/godot-wild-jam-18'
  version: 'tags/v0.1.18'
  regex: true
  file: "plague-.*\\.zip"
  target: 'subdir/'
  token: ${{ secrets.GITHUB_TOKEN }}

Support

This action only supports Linux runners as this is a docker container action. If you encounter Error: Container action is only supported on Linux then you are using non-linux runner.

fetch-gh-release-asset's People

Contributors

ash0x0 avatar bitbrain avatar bvamos avatar dsaltares avatar er1c avatar geirsagberg avatar jgillis avatar jgrund avatar joseph-flinn avatar maciejp avatar pmbanka avatar pseusys avatar su8u7sfkcwtjvh7pjavmej7d avatar umireon avatar vojtapol avatar

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.