From 5494ee1e83eef512e032795ec7833b856530d5dd Mon Sep 17 00:00:00 2001 From: SWS-Chipkin Date: Thu, 24 Sep 2026 16:09:55 -0700 Subject: [PATCH] ci: upload one copy of each release asset (fix duplicate-name publish failure) Every platform artifact carries the same docs (README.md, LICENSE, TUTORIAL.md, ...), and the publish job handed all of them to softprops/action-gh-release with `files: artifacts/**/*`. Uploading two assets with the same name makes the action fail part-way ("Not Found" updating asset metadata) and leaves a draft release behind - BACnetProfileExample-B-SCHUB-CPP v1.1.18 hit exactly this. The publish job now flattens the downloaded artifacts into release/, keeping one copy of each file name, and fails loudly if two files share a name but differ. Same asset set as before, each name once. Applied series-wide (the release job is a shared template, checked by tools/check-series.sh check 11). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 684055c..44718dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -134,8 +134,26 @@ jobs: - uses: actions/download-artifact@v4 with: path: artifacts + # Every platform artifact carries the same docs (README.md, LICENSE, ...). + # Uploading two assets with one name makes the release action fail part-way + # and leaves a draft release behind (a real tagged release hit this). Flatten the + # artifacts into one folder with a single copy of each file name, and stop + # if two files share a name but differ. + - name: Collect release assets (one copy of each file name) + shell: bash + run: | + mkdir -p release + find artifacts -type f | sort | while read -r f; do + name=$(basename "$f") + if [ -e "release/$name" ]; then + cmp -s "$f" "release/$name" || { echo "FAIL: two different files are both named $name ($f)"; exit 1; } + else + cp "$f" "release/$name" + fi + done + ls -l release - uses: softprops/action-gh-release@v2 with: name: ${{ github.ref_name }} generate_release_notes: true - files: artifacts/**/* + files: release/*