-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96cd8fd
commit ca29fdd
Showing
4 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,49 +12,47 @@ This action will work for any project that satisfies the following conditions: | |
- 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` | | ||
| Arch | Node Platform | Targets | | ||
| ------- | ------------- | ----------------------------------------------------------- | | ||
| `x64` | `linux` | `x86_64-unknown-linux-musl` or `x86_64-unknown-linux-gnu` | | ||
| `x64` | `darwin` | `x86_64-apple-darwin` | | ||
| `x64` | `win32` | `x86_64-pc-windows-msvc` | | ||
| `arm64` | `linux` | `aarch64-unknown-linux-musl` or `aarch64-unknown-linux-gnu` | | ||
| `arm64` | `darwin` | `aarch64-apple-darwin` | | ||
|
||
- 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 | ||
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](https://github.com/rust-lang/mdBook). | ||
|
||
```yaml | ||
- uses: extractions/setup-crate@v1 | ||
with: | ||
owner: rust-lang | ||
name: mdBook | ||
repo: rust-lang/mdBook | ||
``` | ||
If you want a specific version you can specify this by passing the `version` | ||
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](https://github.com/casey/just). | ||
|
||
```yaml | ||
- uses: extractions/setup-crate@v1 | ||
with: | ||
owner: casey | ||
name: just | ||
version: 0.10 | ||
repo: casey/[email protected] | ||
``` | ||
|
||
### 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 }} | | ||
| Name | Required | Description | Type | Default | | ||
| -------------- | -------- | ------------------------------------------------------------------- | ------ | --------------------------- | | ||
| `repo` | no | The GitHub repository name and 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](https://www.npmjs.com/package/semver). This GitHub Action will install | ||
|
@@ -66,6 +64,17 @@ the latest matching release. Examples include | |
- `version: '0.1.0'` equivalent to `=0.1.0`. | ||
- `version: '^0.1.0'` equivalent to `>=0.1.0 <0.2.0`. | ||
|
||
### Deprecated inputs | ||
|
||
The following inputs are still supported for now but will be removed in a future | ||
release. | ||
|
||
| Name | Required | Description | Type | Default | | ||
| --------- | -------- | -------------------------------------- | ------ | ------- | | ||
| `owner` | no | The GitHub user or organization name | string | | | ||
| `name` | no | The GitHub repository name | string | | | ||
| `version` | no | A valid NPM-style semver specification | string | * | | ||
|
||
## License | ||
|
||
Licensed under either of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters