Skip to content

extractions/setup-crate

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-crate

Build Status

This GitHub Action will install a release of a Rust crate for you.

Introduction

This action will work for any project that satisfies the following conditions:

  • The project is a public GitHub project.

  • The project uses GitHub releases with semver tag names.

  • The project attaches assets to the GitHub release that contain a Rust target. The following targets are looked for:

    Node Platform Targets
    linux x86_64-unknown-linux-musl or x86_64-unknown-linux-gnu
    darwin x86_64-apple-darwin
    win32 x86_64-pc-windows-msvc
  • The asset is a .tar.gz or .zip archive that contains a binary with the project name.

Usage

Examples

In most cases all you will need is to specify the owner and the name of the project in your workflow. For example the following installs the latest version of mdBook.

- uses: extractions/setup-crate@v1
  with:
    owner: rust-lang
    name: mdBook

If you want a specific version you can specify this by passing the version input. For example the following installs the latest 0.10.x version of just.

- uses: extractions/setup-crate@v1
  with:
    owner: casey
    name: just
    version: 0.10

Inputs

Name Required Description Type Default
owner yes The GitHub user or organization name string
name yes The GitHub repository name string
version no A valid NPM-style semver specification string *
github-token no The GitHub token for making API requests string ${{ secrets.GITHUB_TOKEN }}

The semver specification is passed directly to NPM's semver package. This GitHub Action will install the latest matching release. Examples include

  • version: '*' latest version (default).
  • version: '0.1' equivalent to >=0.1.0 <0.2.0.
  • version: '0.1.x' equivalent to >=0.1.0 <0.2.0.
  • version: '0.1.0' equivalent to =0.1.0.
  • version: '^0.1.0' equivalent to >=0.1.0 <0.2.0.

License

Licensed under either of

at your option.

About

📦 GitHub Action to install a Rust crate from a GitHub release

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks