29 lines
1.1 KiB
Markdown
29 lines
1.1 KiB
Markdown
# publish-rust-crate
|
|
|
|
Publish a Rust crate to JFrog Artifactory.
|
|
|
|
## Inputs
|
|
|
|
| Input | Required | Default | Description |
|
|
|-------|----------|---------|-------------|
|
|
| `working-directory` | No | `.` | Directory containing `Cargo.toml` |
|
|
| `rust-version` | No | `1.95.0` | Rust toolchain version |
|
|
| `jfrog-token` | Yes | — | JFrog token for the Artifactory Cargo registry |
|
|
| `registry-name` | No | `artifactory` | Cargo registry name |
|
|
| `registry-index` | No | `sparse+https://schmalz.jfrog.io/artifactory/api/cargo/schmalz-cargo-local/index/` | Cargo registry index URL |
|
|
|
|
## Usage
|
|
|
|
```yaml
|
|
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/publish-rust-crate@publish-rust-crate-v1
|
|
with:
|
|
working-directory: .
|
|
jfrog-token: ${{ secrets.JFROG_TOKEN }}
|
|
```
|
|
|
|
## Notes
|
|
|
|
- Configures Cargo registry settings in `${CARGO_HOME}/config.toml` and `${CARGO_HOME}/credentials.toml`.
|
|
- Falls back to `$HOME/.cargo` when `CARGO_HOME` is not set.
|
|
- Publishes with `cargo publish --registry <registry-name>`.
|
|
- Third-party actions used internally are pinned to exact commit SHAs to prevent supply chain attacks.
|