Skip to content

Commit 178d21c

Browse files
committed
Clarify release output inputs
1 parent b548f50 commit 178d21c

5 files changed

Lines changed: 77 additions & 64 deletions

File tree

.github/workflows/conda-cpp-build.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ on:
4848
type: string
4949
default: ''
5050
required: false
51-
description: "Override the release-platform unit ID; defaults to conda:<repository-name>"
51+
description: >-
52+
Release component ID: a string label, not a file or bundle. It is written to each manifest entry and groups
53+
files and matrix variants for release assembly. Leave empty to use conda:<repository-name>; override only
54+
when one repository's Conda producers must be tracked as distinct components.
5255
matrix_filter:
5356
description: |
5457
jq expression which modifies the matrix.
@@ -234,11 +237,14 @@ jobs:
234237

235238
- name: Create Conda release build-output companion
236239
if: ${{ inputs.upload-artifacts }}
237-
uses: rapidsai/shared-actions/release-build-output-dispatch@3a9568fc2c9bc9fd05e4cf76a73d9ad481f93ac5 # agent/release-build-output-container
240+
uses: rapidsai/shared-actions/release-build-output-dispatch@a18a4a7ac572366c09c15641ec274cc6f15bfb5d # agent/release-build-output-container
238241
with:
239-
artifact-type: conda
240-
output-directory: ${{ steps.package-name.outputs.CONDA_OUTPUT_DIR }}
241-
release-unit: ${{ inputs.release-unit || format('conda:{0}', github.event.repository.name) }}
242+
config: >-
243+
{
244+
"artifact_type": "conda",
245+
"component_id": ${{ toJSON(inputs.release-unit || format('conda:{0}', github.event.repository.name)) }},
246+
"output_directory": ${{ toJSON(steps.package-name.outputs.CONDA_OUTPUT_DIR) }}
247+
}
242248
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
243249
source-sha: ${{ inputs.sha || github.sha }}
244250
- name: Upload additional artifacts

.github/workflows/conda-python-build.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ on:
4848
type: string
4949
default: ''
5050
required: false
51-
description: "Override the release-platform unit ID; defaults to conda:<repository-name>"
51+
description: >-
52+
Release component ID: a string label, not a file or bundle. It is written to each manifest entry and groups
53+
files and matrix variants for release assembly. Leave empty to use conda:<repository-name>; override only
54+
when one repository's Conda producers must be tracked as distinct components.
5255
matrix_filter:
5356
description: |
5457
jq expression which modifies the matrix.
@@ -239,11 +242,14 @@ jobs:
239242

240243
- name: Create Conda release build-output companion
241244
if: ${{ inputs.upload-artifacts }}
242-
uses: rapidsai/shared-actions/release-build-output-dispatch@3a9568fc2c9bc9fd05e4cf76a73d9ad481f93ac5 # agent/release-build-output-container
245+
uses: rapidsai/shared-actions/release-build-output-dispatch@a18a4a7ac572366c09c15641ec274cc6f15bfb5d # agent/release-build-output-container
243246
with:
244-
artifact-type: conda
245-
output-directory: ${{ steps.package-name.outputs.CONDA_OUTPUT_DIR }}
246-
release-unit: ${{ inputs.release-unit || format('conda:{0}', github.event.repository.name) }}
247+
config: >-
248+
{
249+
"artifact_type": "conda",
250+
"component_id": ${{ toJSON(inputs.release-unit || format('conda:{0}', github.event.repository.name)) }},
251+
"output_directory": ${{ toJSON(steps.package-name.outputs.CONDA_OUTPUT_DIR) }}
252+
}
247253
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
248254
source-sha: ${{ inputs.sha || github.sha }}
249255
- name: Upload additional artifacts

.github/workflows/custom-job.yaml

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -106,35 +106,14 @@ on:
106106
type: boolean
107107
required: false
108108
release-build-output:
109-
description: "Generate a release-build-output companion for the uploaded artifact bundle"
110-
default: false
111-
type: boolean
112-
required: false
113-
release-unit:
114-
description: "Stable release-platform unit ID; required when release-build-output is true"
115-
default: ''
116-
type: string
117-
required: false
118-
release-package:
119-
description: "JSON package identity shared by the bundle; mutually exclusive with release-package-file"
120-
default: ''
121-
type: string
122-
required: false
123-
release-package-file:
124-
description: "Producer-created package JSON relative to release-output-directory"
109+
description: >-
110+
Optional JSON object describing a custom release package bundle. A non-empty value creates the companion;
111+
leave empty for logs, documentation, tests, and other non-release artifacts. Requires artifact_type set to
112+
custom, component_id, artifacts, and exactly one of package or package_file; output_directory defaults to
113+
'.'. The shared action validates every field before inspecting build outputs.
125114
default: ''
126115
type: string
127116
required: false
128-
release-artifacts:
129-
description: "JSON primary-artifact and evidence descriptors relative to release-output-directory"
130-
default: ''
131-
type: string
132-
required: false
133-
release-output-directory:
134-
description: "Directory containing the primary artifact paths described by release-artifacts"
135-
default: '.'
136-
type: string
137-
required: false
138117

139118
defaults:
140119
run:
@@ -259,15 +238,10 @@ jobs:
259238
path: ${{ inputs.file_to_upload }}
260239
if-no-files-found: ignore
261240
- name: Create release build-output companion
262-
if: ${{ inputs.release-build-output }}
263-
uses: rapidsai/shared-actions/release-build-output-dispatch@3a9568fc2c9bc9fd05e4cf76a73d9ad481f93ac5 # agent/release-build-output-container
241+
if: ${{ inputs.release-build-output != '' }}
242+
uses: rapidsai/shared-actions/release-build-output-dispatch@a18a4a7ac572366c09c15641ec274cc6f15bfb5d # agent/release-build-output-container
264243
with:
265-
artifact-type: custom
266-
output-directory: ${{ inputs.release-output-directory }}
267-
release-artifacts: ${{ inputs.release-artifacts }}
268-
release-package: ${{ inputs.release-package }}
269-
release-package-file: ${{ inputs.release-package-file }}
270-
release-unit: ${{ inputs.release-unit }}
244+
config: ${{ inputs.release-build-output }}
271245
source-artifact-name: ${{ inputs.artifact-name }}
272246
source-sha: ${{ inputs.sha || github.sha }}
273247
- name: Upload additional artifacts

.github/workflows/wheels-build.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ on:
7979
type: string
8080
default: ''
8181
required: false
82-
description: "Override the release-platform unit ID; defaults to wheel:<repository-name>"
82+
description: >-
83+
Release component ID: a string label, not a file or bundle. It is written to each manifest entry and groups
84+
files and matrix variants for release assembly. Leave empty to use wheel:<repository-name>; override only
85+
when one repository's wheel producers must be tracked as distinct components.
8386
extra-repo:
8487
required: false
8588
type: string
@@ -305,11 +308,14 @@ jobs:
305308

306309
- name: Create wheel release build-output companion
307310
if: ${{ inputs.upload-artifacts }}
308-
uses: rapidsai/shared-actions/release-build-output-dispatch@3a9568fc2c9bc9fd05e4cf76a73d9ad481f93ac5 # agent/release-build-output-container
311+
uses: rapidsai/shared-actions/release-build-output-dispatch@a18a4a7ac572366c09c15641ec274cc6f15bfb5d # agent/release-build-output-container
309312
with:
310-
artifact-type: wheel
311-
output-directory: ${{ steps.package-name.outputs.WHEEL_OUTPUT_DIR }}
312-
release-unit: ${{ inputs.release-unit || format('wheel:{0}', github.event.repository.name) }}
313+
config: >-
314+
{
315+
"artifact_type": "wheel",
316+
"component_id": ${{ toJSON(inputs.release-unit || format('wheel:{0}', github.event.repository.name)) }},
317+
"output_directory": ${{ toJSON(steps.package-name.outputs.WHEEL_OUTPUT_DIR) }}
318+
}
313319
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
314320
source-sha: ${{ inputs.sha || github.sha }}
315321

README.md

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,38 @@ source-artifact name, and original files authoritative and avoids a second
2929
runner and artifact download.
3030

3131
The standard wheel and Conda builders create a companion for every uploaded
32-
bundle. The release unit defaults to `wheel:<repository-name>` or
32+
bundle. The release component ID defaults to `wheel:<repository-name>` or
3333
`conda:<repository-name>` and can be overridden with `release-unit` when the
34-
release-platform catalog uses a different ID. The shared action reads exact
35-
package metadata from the built files and uploads
34+
release catalog needs to track multiple producer families in one repository as
35+
distinct components. `release-unit` is the API's historical name for this ID.
36+
It is a string label, not a file, directory, artifact bundle, or list of files.
37+
The same ID is written on every primary file in the component and is reused
38+
across its matrix variants, such as CUDA version, Python version, and
39+
architecture, so release assembly can group those outputs together. Most
40+
standard Conda and wheel callers should leave `release-unit` unset. The shared
41+
action reads exact package metadata from the built files and uploads
3642
`release-build-output-<artifact-name>`. No release-specific caller
3743
configuration is required for the standard builders.
3844

39-
`custom-job.yaml` remains explicitly opt-in through `release-build-output` and
40-
also requires `release-unit`, `release-output-directory`, `release-artifacts`,
41-
and either `release-package` or
42-
`release-package-file`. Descriptors may name producer-supplied SBOM,
43-
provenance, and signature sidecars relative to the output directory. Each path
44-
or glob must resolve to exactly one file; the action never guesses a release
45-
artifact.
45+
`custom-job.yaml` remains explicitly opt-in through one `release-build-output`
46+
JSON object. An empty string disables companion generation. A non-empty object
47+
requires `artifact_type: custom`, `component_id`, a non-empty `artifacts`
48+
array, and exactly one of `package` or `package_file`; `output_directory`
49+
defaults to the job's working directory. Descriptors may name
50+
producer-supplied SBOM, provenance, and
51+
signature sidecars relative to the output directory. Each path or glob must
52+
resolve to exactly one file; the action never guesses a release artifact.
53+
54+
| Custom-job input | Why and when to use it |
55+
| --- | --- |
56+
| `release-build-output` | Supply one complete JSON configuration only when the upload is a release package bundle. Its presence enables companion generation; an empty value disables it. The shared action reports malformed JSON, unknown keys, missing fields, conflicting package sources, and invalid artifact descriptors before materialization. |
57+
58+
The canonical schema is
59+
[`release-build-output/config.schema.json`](https://github.com/rapidsai/shared-actions/blob/a18a4a7ac572366c09c15641ec274cc6f15bfb5d/release-build-output/config.schema.json).
60+
Pre-commit exercises the schema validator against valid and invalid fixtures.
61+
The pipeline additionally checks properties that cannot be known before the
62+
build, including whether package files and artifact/evidence globs resolve to
63+
exactly one file.
4664

4765
```yaml
4866
cuvs-java-build:
@@ -51,11 +69,14 @@ cuvs-java-build:
5169
# existing build inputs omitted
5270
artifact-name: cuvs-java-cuda12.9.1
5371
file_to_upload: java/cuvs-java/target/
54-
release-build-output: true
55-
release-output-directory: java/cuvs-java/target
56-
release-unit: maven:cuvs-java
57-
release-package-file: cuvs-java.release-package.json
58-
release-artifacts: '[{"path":"cuvs-java-*-x86_64-cuda*.jar"}]'
72+
release-build-output: >-
73+
{
74+
"artifact_type": "custom",
75+
"component_id": "maven:cuvs-java",
76+
"output_directory": "java/cuvs-java/target",
77+
"package_file": "cuvs-java.release-package.json",
78+
"artifacts": [{"path": "cuvs-java-*-x86_64-cuda*.jar"}]
79+
}
5980
```
6081
6182
The release coordinator downloads both artifacts into the same directory, for

0 commit comments

Comments
 (0)