@@ -12,6 +12,7 @@ A reusable GitHub Actions workflow for building, linting, testing, and auditing
1212- Set a working directory for monorepos
1313- Upload build artifacts
1414- Publish to crates.io
15+ - All operations are performed in a single job (no redundant toolchain installs)
1516
1617## Usage
1718
2526 uses : iExecBlockchainComputing/github-actions-workflows/.github/workflows/rust-build.yml@main
2627 with :
2728 rust-version : ' stable'
28- build-target : ' release'
2929 working-directory : ' ./my-crate'
3030 run-audit : true
3131 enable-cache : true
@@ -38,22 +38,23 @@ jobs:
3838
3939## Inputs
4040
41- | Name | Description | Default | Required |
42- | ------------------- | ------------------------------------------------------------ | --------- | -------- |
43- | ` rust-version` | Rust version to use | `stable` | No |
44- | `build-target` | Cargo profile to use for building (`debug`, `release`, etc.) | `release` | No |
45- | `working-directory` | The directory to run jobs from | `.` | No |
46- | `run-audit` | Run `cargo audit` for security vulnerabilities | `true` | No |
47- | `enable-cache` | Enable caching of dependencies | `true` | No |
48- | `upload-artifact` | Upload a build artifact after building | `false` | No |
49- | `artifact-name` | Name of the artifact to upload | – | No |
50- | `artifact-path` | Path to the artifact to upload | – | No |
51- | `publish-crates-io` | Publish the package to crates.io (only if build succeeds) | `false` | No |
41+ | Name | Description | Default | Required |
42+ | ------------------- | --------------------------------------------------------- | -------- | -------- |
43+ | ` rust-version` | Rust version to use | `stable` | No |
44+ | `working-directory` | The directory to run jobs from | `.` | No |
45+ | `run-audit` | Run `cargo audit` for security vulnerabilities | `true` | No |
46+ | `enable-cache` | Enable caching of dependencies | `true` | No |
47+ | `upload-artifact` | Upload a build artifact after building | `false` | No |
48+ | `artifact-name` | Name of the artifact to upload | – | No |
49+ | `artifact-path` | Path to the artifact to upload | – | No |
50+ | `publish-crates-io` | Publish the package to crates.io (only if build succeeds) | `false` | No |
51+
52+ Note : All builds use the release profile by default. There is no build-target input anymore
5253
5354# # Secrets
5455
5556| Name | Description | Required |
56- | ----------------------- | --------------------------------------- | ------------------------------------- |
57+ | ---------------------- | --------------------------------------- | ------------------------------------- |
5758| `CARGO_REGISTRY_TOKEN` | crates.io API token for `cargo publish` | Only if `publish-crates-io` is `true` |
5859
5960# # Examples
8687 run-audit: false
8788` ` `
8889
89- # ## Use Debug Target
90-
91- ` ` ` yaml
92- jobs:
93- build-and-test:
94- uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/rust-build.yml@main
95- with:
96- build-target: 'debug'
97- ` ` `
98-
9990# ## Upload Artifact After Build
10091
10192` ` ` yaml
0 commit comments