Skip to content

Commit 0100118

Browse files
author
Claude
committed
Fix GitHub workflow artifact upload for releases
The release job was failing with 404 errors because multiple build artifacts all contained files named 'libasyncprocess.a', causing naming conflicts when uploading to GitHub releases. Changes: - Added a 'Prepare release files' step that finds all .a files - Renames each library file to include architecture and OS info (e.g., libasyncprocess-x86_64-Linux.a, libasyncprocess-aarch64-Linux.a) - Uploads the uniquely named files from release-files/* directory This ensures each artifact has a unique name in the release.
1 parent c8e72e6 commit 0100118

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,22 @@ jobs:
160160
with:
161161
path: artifacts
162162

163+
- name: Prepare release files
164+
run: |
165+
mkdir -p release-files
166+
# Find and rename all library files with their arch and os
167+
find artifacts -name "*.a" -type f | while read file; do
168+
# Extract the directory structure to get arch and os
169+
dir=$(dirname "$file")
170+
arch=$(basename "$(dirname "$dir")")
171+
os=$(basename "$dir")
172+
# Create a unique filename
173+
cp "$file" "release-files/libasyncprocess-${arch}-${os}.a"
174+
done
175+
# List what we're uploading
176+
ls -la release-files/
177+
163178
- name: Create Release
164179
uses: softprops/action-gh-release@v1
165180
with:
166-
files: |
167-
artifacts/result-linux/**/*
168-
artifacts/result-linux-aarch64/**/*
169-
artifacts/result-osx/**/*
181+
files: release-files/*

0 commit comments

Comments
 (0)