Skip to content

Commit be78bbe

Browse files
author
Bryan Howard
committed
Fix create-release workflow for new artifact structure
**Problem:** Artifact download extracts files directly to working directory, not into a subdirectory as expected. **Analysis:** From failed run logs, all files are present: - ✅ PyFlowGraph.exe (8.8MB) - ✅ examples/ directory - ✅ python_runtime/ directory - ✅ All Qt DLLs and required components **Root Cause:** GitHub Actions downloads artifacts by extracting contents directly, not preserving directory structure. **Solution:** - Remove expectation of subdirectory structure - Check for files directly in working directory - Verify PyFlowGraph.exe and key directories exist - Create zip from current directory with exclusions - Exclude development files (src/, tests/, .git/, docs/, etc.) - Include only runtime files needed for distribution **Result:** Release zip will contain clean distribution ready for end users. 🤖 Generated with [Claude Code](https://claude.ai/code)
1 parent 7e46d6d commit be78bbe

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

.github/workflows/create-release.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,29 +100,36 @@ jobs:
100100
- name: Verify and prepare artifact for release
101101
id: verify
102102
run: |
103-
artifact_dir="PyFlowGraph-Windows-${{ inputs.tag_name }}"
104103
zip_file="PyFlowGraph-Windows-${{ inputs.tag_name }}.zip"
105104
106-
if [ ! -d "$artifact_dir" ]; then
107-
echo "ERROR: Expected artifact directory not found: $artifact_dir"
105+
# Check if PyFlowGraph.exe exists (artifact was extracted directly to working directory)
106+
if [ ! -f "PyFlowGraph.exe" ]; then
107+
echo "ERROR: PyFlowGraph.exe not found in current directory"
108+
echo "Directory contents:"
108109
ls -la
109110
exit 1
110111
fi
111112
112-
# Check if PyFlowGraph.exe exists in the artifact
113-
if [ ! -f "$artifact_dir/PyFlowGraph.exe" ]; then
114-
echo "ERROR: PyFlowGraph.exe not found in $artifact_dir"
115-
ls -la "$artifact_dir"
113+
# Verify key components exist
114+
if [ ! -d "examples" ] || [ ! -d "python_runtime" ]; then
115+
echo "ERROR: Missing required directories (examples or python_runtime)"
116+
ls -la
116117
exit 1
117118
fi
118119
119-
# Create release zip file from the directory
120+
echo "SUCCESS: Found all required artifact components"
121+
echo "- PyFlowGraph.exe: $(ls -lh PyFlowGraph.exe | awk '{print $5}')"
122+
echo "- Examples directory: $(ls examples | wc -l) files"
123+
echo "- Python runtime directory exists: ✅"
124+
125+
# Create release zip file from current directory contents
120126
echo "Creating release zip: $zip_file"
121127
if command -v zip >/dev/null 2>&1; then
122-
cd "$artifact_dir" && zip -r "../$zip_file" . && cd ..
128+
# Exclude git and other unnecessary files
129+
zip -r "$zip_file" . -x ".git/*" ".github/*" "src/*" "tests/*" "test_reports/*" "docs/*" "images/*" "pre-release/*" "*.md" "run.sh" "run_test_gui.bat" "*.txt"
123130
else
124-
# Fallback for systems without zip command
125-
tar -czf "${zip_file%.zip}.tar.gz" -C "$artifact_dir" .
131+
# Fallback for systems without zip command
132+
tar -czf "${zip_file%.zip}.tar.gz" --exclude='.git' --exclude='.github' --exclude='src' --exclude='tests' --exclude='test_reports' --exclude='docs' --exclude='images' --exclude='pre-release' --exclude='*.md' --exclude='run.sh' --exclude='run_test_gui.bat' --exclude='*.txt' .
126133
zip_file="${zip_file%.zip}.tar.gz"
127134
fi
128135

0 commit comments

Comments
 (0)