@@ -112,20 +112,21 @@ jobs:
112112
113113 # Find the paths to the artifact files that will be included in the release, compute
114114 # the SHA digest for all the release files and encode them using Base64, and export it
115- # from this job.
115+ # from this job. Note that using -maxdepth 1 ensures searching for the generated
116+ # artifacts only, even if other directories (e.g. a generated Simple Index) exist.
116117 - name : Compute package hash
117118 if : matrix.os == env.ARTIFACT_OS && matrix.python == env.ARTIFACT_PYTHON
118119 id : compute-hash
119120 shell : bash
120121 run : |
121122 set -euo pipefail
122- TARBALL_PATH=$(find dist/ -type f -name "*.tar.gz")
123- WHEEL_PATH=$(find dist/ -type f -name "*.whl")
124- REQUIREMENTS_PATH=$(find dist/ -type f -name "*-requirements.txt")
125- SBOM_PATH=$(find dist/ -type f -name "*-sbom.json")
126- HTML_DOCS_PATH=$(find dist/ -type f -name "*-docs-html.zip")
127- MARKDOWN_DOCS_PATH=$(find dist/ -type f -name "*-docs-md.zip")
128- BUILD_EPOCH_PATH=$(find dist/ -type f -name "*-build-epoch.txt")
123+ TARBALL_PATH=$(find dist/ -maxdepth 1 - type f -name "*.tar.gz")
124+ WHEEL_PATH=$(find dist/ -maxdepth 1 - type f -name "*.whl")
125+ REQUIREMENTS_PATH=$(find dist/ -maxdepth 1 - type f -name "*-requirements.txt")
126+ SBOM_PATH=$(find dist/ -maxdepth 1 - type f -name "*-sbom.json")
127+ HTML_DOCS_PATH=$(find dist/ -maxdepth 1 - type f -name "*-docs-html.zip")
128+ MARKDOWN_DOCS_PATH=$(find dist/ -maxdepth 1 - type f -name "*-docs-md.zip")
129+ BUILD_EPOCH_PATH=$(find dist/ -maxdepth 1 - type f -name "*-build-epoch.txt")
129130 DIGEST=$(sha256sum "$TARBALL_PATH" "$WHEEL_PATH" "$REQUIREMENTS_PATH" "$SBOM_PATH" "$HTML_DOCS_PATH" "$MARKDOWN_DOCS_PATH" "$BUILD_EPOCH_PATH" | base64 -w0)
130131 echo "Digest of artifacts is $DIGEST."
131132 echo "artifacts-sha256=$DIGEST" >> "$GITHUB_OUTPUT"
0 commit comments