|
| 1 | +name: Create release build output companion |
| 2 | +description: Validate a build artifact bundle and upload its release-platform manifest and evidence companion. |
| 3 | + |
| 4 | +inputs: |
| 5 | + artifact-type: |
| 6 | + description: One of conda, wheel, or custom. Conda and wheel descriptors are derived when release-artifacts is omitted. |
| 7 | + required: true |
| 8 | + release-unit: |
| 9 | + description: Release-platform unit ID for every primary artifact in this bundle. |
| 10 | + required: true |
| 11 | + release-package: |
| 12 | + description: JSON package fields shared by the bundle. Provide this or release-package-file for custom artifacts. |
| 13 | + required: false |
| 14 | + release-package-file: |
| 15 | + description: Relative path to producer-created package JSON inside output-directory. |
| 16 | + required: false |
| 17 | + release-artifacts: |
| 18 | + description: JSON artifact and evidence descriptors relative to output-directory. Required for custom artifacts. |
| 19 | + required: false |
| 20 | + output-directory: |
| 21 | + description: Directory containing the primary files and any producer-supplied evidence. |
| 22 | + required: true |
| 23 | + manifest-name: |
| 24 | + description: Filename to write inside output-directory. |
| 25 | + required: false |
| 26 | + default: release-build-output.json |
| 27 | + metadata-name: |
| 28 | + description: Filename for the build-environment and SBOM-classification envelope. |
| 29 | + required: false |
| 30 | + default: release-build-metadata.json |
| 31 | + source-artifact-name: |
| 32 | + description: Name of the GitHub Actions artifact bundle containing this output. |
| 33 | + required: true |
| 34 | + source-sha: |
| 35 | + description: Source revision built by the producing job. Defaults to the current workflow SHA. |
| 36 | + required: false |
| 37 | + |
| 38 | +outputs: |
| 39 | + manifest-path: |
| 40 | + description: Absolute path to the generated manifest. |
| 41 | + value: ${{ steps.materialize.outputs.manifest-path }} |
| 42 | + metadata-path: |
| 43 | + description: Absolute path to the build metadata envelope. |
| 44 | + value: ${{ steps.materialize.outputs.metadata-path }} |
| 45 | + manifest-artifact-name: |
| 46 | + description: Name of the uploaded GitHub Actions companion artifact. |
| 47 | + value: ${{ steps.companion-name.outputs.name }} |
| 48 | + |
| 49 | +runs: |
| 50 | + using: composite |
| 51 | + steps: |
| 52 | + - id: prepare |
| 53 | + name: Describe release artifacts |
| 54 | + shell: bash |
| 55 | + env: |
| 56 | + RELEASE_ARTIFACTS: ${{ inputs.release-artifacts }} |
| 57 | + RELEASE_ARTIFACT_TYPE: ${{ inputs.artifact-type }} |
| 58 | + RELEASE_OUTPUT_DIRECTORY: ${{ inputs.output-directory }} |
| 59 | + RELEASE_PACKAGE: ${{ inputs.release-package }} |
| 60 | + RELEASE_PACKAGE_FILE: ${{ inputs.release-package-file }} |
| 61 | + run: ./shared-actions/release-build-output/prepare.sh |
| 62 | + - id: materialize |
| 63 | + name: Materialize release build-output records |
| 64 | + shell: bash |
| 65 | + env: |
| 66 | + RELEASE_ARTIFACTS: ${{ steps.prepare.outputs.artifacts }} |
| 67 | + RELEASE_MANIFEST_NAME: ${{ inputs.manifest-name }} |
| 68 | + RELEASE_METADATA_NAME: ${{ inputs.metadata-name }} |
| 69 | + RELEASE_OUTPUT_DIRECTORY: ${{ inputs.output-directory }} |
| 70 | + RELEASE_PACKAGE: ${{ steps.prepare.outputs.package }} |
| 71 | + RELEASE_PACKAGE_FILE: ${{ inputs.release-package-file }} |
| 72 | + RELEASE_SOURCE_ARTIFACT_NAME: ${{ inputs.source-artifact-name }} |
| 73 | + RELEASE_SOURCE_SHA: ${{ inputs.source-sha || github.sha }} |
| 74 | + RELEASE_UNIT: ${{ inputs.release-unit }} |
| 75 | + run: ./shared-actions/release-build-output/materialize.sh |
| 76 | + - id: companion-name |
| 77 | + name: Set companion artifact name |
| 78 | + shell: bash |
| 79 | + env: |
| 80 | + SOURCE_ARTIFACT_NAME: ${{ inputs.source-artifact-name }} |
| 81 | + run: echo "name=release-build-output-${SOURCE_ARTIFACT_NAME}" >>"${GITHUB_OUTPUT}" |
| 82 | + - name: Upload release build-output companion |
| 83 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 84 | + with: |
| 85 | + if-no-files-found: error |
| 86 | + name: ${{ steps.companion-name.outputs.name }} |
| 87 | + path: | |
| 88 | + ${{ inputs.output-directory }}/${{ inputs.manifest-name }} |
| 89 | + ${{ inputs.output-directory }}/${{ inputs.metadata-name }} |
| 90 | + ${{ inputs.output-directory }}/release-evidence/** |
0 commit comments