Home

Awesome

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:

Usage

Examples

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

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

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

- uses: extractions/setup-crate@v1
  with:
    repo: casey/just@0.10

Inputs

NameRequiredDescriptionTypeDefault
reponoThe GitHub repository name and valid NPM-style semver specificationstring
github-tokennoThe GitHub token for making API requestsstring${{ 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

Deprecated inputs

The following inputs are still supported for now but will be removed in a future release.

NameRequiredDescriptionTypeDefault
ownernoThe GitHub user or organization namestring
namenoThe GitHub repository namestring
versionnoA valid NPM-style semver specificationstring*

License

Licensed under either of

at your option.