mirror of
https://github.com/Z3Prover/z3
synced 2026-05-05 18:05:15 +00:00
Merge pull request #8602 from Z3Prover/copilot/fix-nightly-build-job
Fix nightly workflow: remove unsupported --clobber flag and add artifact deduplication
This commit is contained in:
commit
b381de4f3f
1 changed files with 29 additions and 8 deletions
37
.github/workflows/nightly.yml
vendored
37
.github/workflows/nightly.yml
vendored
|
|
@ -706,15 +706,36 @@ jobs:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
ls
|
ls
|
||||||
find tmp -type f \( -name "*.zip" -o -name "*.whl" -o -name "*.tar.gz" -o -name "*.nupkg" -o -name "*.snupkg" \) > release_files.txt
|
find tmp -type f \( -name "*.zip" -o -name "*.whl" -o -name "*.tar.gz" -o -name "*.nupkg" -o -name "*.snupkg" \) -print0 > release_files.txt
|
||||||
|
|
||||||
gh release create Nightly \
|
# Deduplicate files - keep only first occurrence of each basename
|
||||||
--title "Nightly" \
|
# Use NUL-delimited input/output to handle spaces in filenames safely
|
||||||
--notes "Automated nightly build from commit ${{ github.sha }}" \
|
declare -A seen_basenames
|
||||||
--prerelease \
|
declare -a unique_files
|
||||||
--target ${{ github.sha }} \
|
|
||||||
--clobber \
|
while IFS= read -r -d $'\0' filepath || [ -n "$filepath" ]; do
|
||||||
$(cat release_files.txt | tr '\n' ' ')
|
[ -z "$filepath" ] && continue
|
||||||
|
basename="${filepath##*/}"
|
||||||
|
|
||||||
|
# Keep only first occurrence of each basename
|
||||||
|
if [ -z "${seen_basenames[$basename]}" ]; then
|
||||||
|
seen_basenames[$basename]=1
|
||||||
|
unique_files+=("$filepath")
|
||||||
|
fi
|
||||||
|
done < release_files.txt
|
||||||
|
|
||||||
|
# Create release with properly quoted file arguments
|
||||||
|
if [ ${#unique_files[@]} -gt 0 ]; then
|
||||||
|
gh release create Nightly \
|
||||||
|
--title "Nightly" \
|
||||||
|
--notes "Automated nightly build from commit ${{ github.sha }}" \
|
||||||
|
--prerelease \
|
||||||
|
--target ${{ github.sha }} \
|
||||||
|
"${unique_files[@]}"
|
||||||
|
else
|
||||||
|
echo "No files to release after deduplication"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
publish-test-pypi:
|
publish-test-pypi:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue