shared-actions/publish-rust-crate/README.md
Michael Seele 801c7e2249
All checks were successful
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 1m5s
validate-shared-actions / validate-shared-actions (pull_request) Successful in 47s
feat: add publish actions with documentation
2026-06-11 07:34:01 +00:00

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.