Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions build-wheelhouse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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//-/_}"
Comment on lines +356 to +357
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that work instead?

Suggested change
SANITIZED_NAME="${LIBRARY_NAME}"
SANITIZED_NAME="${SANITIZED_NAME//-/_}"
SANITIZED_NAME="${LIBRARY_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' }}
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/source/changelog/1112.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update wheelhouse artifacts names
Loading