diff --git a/build-wheelhouse/action.yml b/build-wheelhouse/action.yml index 7124f0020..b39ec196a 100644 --- a/build-wheelhouse/action.yml +++ b/build-wheelhouse/action.yml @@ -346,18 +346,33 @@ runs: echo "Renaming SBOM file..." mv sbom.spdx "${LIBRARY_NAME}-v${LIBRARY_VERSION}-${WHEELHOUSE_TARGET}-${OPERATING_SYSTEM}-${PYTHON_VERSION}-sbom.spdx" + - name: "Sanitize library name" + id: sanitize + shell: bash + env: + LIBRARY_NAME: "${{ inputs.library-name }}" + run: | + # Replace all hyphens with underscores + SANITIZED_NAME="${LIBRARY_NAME}" + SANITIZED_NAME="${SANITIZED_NAME//-/_}" + echo "sanitized_library_name=${SANITIZED_NAME}" >> "${GITHUB_OUTPUT}" + - name: "Upload the SBOM file" uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + env: + LIBRARY_NAME: ${{ steps.sanitize.outputs.sanitized_library_name }} with: - name: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-sbom - path: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-sbom.spdx + name: ${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-sbom + path: ${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-sbom.spdx retention-days: 7 - name: Generate build provenance attestation if: ${{ inputs.attest-provenance == 'true' }} uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0 + env: + LIBRARY_NAME: ${{ steps.sanitize.outputs.sanitized_library_name }} with: - subject-path: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-sbom.spdx + subject-path: ${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-sbom.spdx - name: "Optionally install build and wheel" if: ${{ inputs.install-build-and-wheel == 'true' }} @@ -389,22 +404,28 @@ runs: - name: "Compress the wheelhouse" uses: vimtor/action-zip@1379ea20d4c5705669ba81fd626dd01b1c738f26 # v1.2 + env: + LIBRARY_NAME: ${{ steps.sanitize.outputs.sanitized_library_name }}- with: files: wheelhouse - dest: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}.zip + dest: "${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}.zip" - name: "Upload the compressed wheelhouse" uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + env: + LIBRARY_NAME: ${{ steps.sanitize.outputs.sanitized_library_name }}- with: - name: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }} - path: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}.zip + name: "${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}" + path: "${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}.zip" retention-days: 7 - name: Generate build provenance attestation if: inputs.attest-provenance == 'true' uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0 + env: + LIBRARY_NAME: ${{ steps.sanitize.outputs.sanitized_library_name }} with: - subject-path: ${{ inputs.library-name }}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}.zip + subject-path: "${LIBRARY_NAME}-v${{ steps.library-version.outputs.library_version }}-${{ steps.specific-target-requested.outputs.wheelhouse_target }}-${{ inputs.operating-system }}-${{ inputs.python-version }}.zip" - name: Check library's dependencies license uses: ansys/actions/check-licenses@main diff --git a/doc/source/changelog/1112.added.md b/doc/source/changelog/1112.added.md new file mode 100644 index 000000000..ccb133dc5 --- /dev/null +++ b/doc/source/changelog/1112.added.md @@ -0,0 +1 @@ +Update wheelhouse artifacts names