Skip to content

Commit 3f5a250

Browse files
author
Bryan Howard
committed
Fix Windows build packaging and executable naming
**Packaging Improvements:** - Fix double-zipping issue by uploading directory artifact instead of pre-compressed zip - Remove manual Compress-Archive step that created nested zip structure - Update artifact upload to use directory path directly - Users now extract once instead of twice for better UX **Executable Naming:** - Rename output from main.exe to PyFlowGraph.exe using --output-filename - Update all path references from main.dist to PyFlowGraph.dist - Professional executable name that matches project branding **Release Workflow Updates:** - Update create-release.yml to handle directory artifacts - Add verification for PyFlowGraph.exe in downloaded artifacts - Create final release zip from directory contents - Maintain backward compatibility with existing release process **Additional:** - Add pre-release directory to .gitignore 🤖 Generated with [Claude Code](https://claude.ai/code)
1 parent b90fc85 commit 3f5a250

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

.github/workflows/create-release.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,37 @@ jobs:
9797
github-token: ${{ secrets.GITHUB_TOKEN }}
9898
run-id: ${{ steps.find_artifact.outputs.run_id }}
9999

100-
- name: Verify downloaded artifact
100+
- name: Verify and prepare artifact for release
101101
id: verify
102102
run: |
103-
zip_file="PyFlowGraph_Windows_${{ inputs.tag_name }}.zip"
104-
if [ ! -f "$zip_file" ]; then
105-
echo "ERROR: Expected zip file not found: $zip_file"
103+
artifact_dir="PyFlowGraph-Windows-${{ inputs.tag_name }}"
104+
zip_file="PyFlowGraph-Windows-${{ inputs.tag_name }}.zip"
105+
106+
if [ ! -d "$artifact_dir" ]; then
107+
echo "ERROR: Expected artifact directory not found: $artifact_dir"
106108
ls -la
107109
exit 1
108110
fi
109111
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"
116+
exit 1
117+
fi
118+
119+
# Create release zip file from the directory
120+
echo "Creating release zip: $zip_file"
121+
if command -v zip >/dev/null 2>&1; then
122+
cd "$artifact_dir" && zip -r "../$zip_file" . && cd ..
123+
else
124+
# Fallback for systems without zip command
125+
tar -czf "${zip_file%.zip}.tar.gz" -C "$artifact_dir" .
126+
zip_file="${zip_file%.zip}.tar.gz"
127+
fi
128+
110129
file_size=$(stat -f%z "$zip_file" 2>/dev/null || stat -c%s "$zip_file" 2>/dev/null)
111-
echo "SUCCESS: Found artifact: $zip_file ($file_size bytes)"
130+
echo "SUCCESS: Created release package: $zip_file ($file_size bytes)"
112131
echo "zip_file=$zip_file" >> $GITHUB_OUTPUT
113132
114133
- name: Generate changelog

.github/workflows/windows-build.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
--enable-plugin=pyside6 `
7272
--include-qt-plugins=platforms `
7373
--output-dir=../NodeEditor_Build `
74+
--output-filename=PyFlowGraph.exe `
7475
--nofollow-import-to=tkinter,unittest,setuptools,pip,wheel `
7576
--windows-disable-console `
7677
--remove-output `
@@ -85,7 +86,7 @@ jobs:
8586
- name: Copy Python runtime after Nuitka build
8687
shell: pwsh
8788
run: |
88-
$distDir = "NodeEditor_Build\main.dist"
89+
$distDir = "NodeEditor_Build\PyFlowGraph.dist"
8990
Write-Host "Copying python_runtime to $distDir..."
9091
Copy-Item -Path "python_runtime" -Destination $distDir -Recurse -Force
9192
@@ -101,7 +102,7 @@ jobs:
101102
}
102103
$version = $version -replace '[\/\\:*?"<>|]', '-' # Replace invalid characters
103104
$build_dir = "NodeEditor_Build"
104-
$dist_dir = Join-Path $build_dir "main.dist"
105+
$dist_dir = Join-Path $build_dir "PyFlowGraph.dist"
105106
106107
# Verify the directory exists
107108
if (-not (Test-Path $dist_dir)) {
@@ -110,35 +111,33 @@ jobs:
110111
exit 1
111112
}
112113
113-
$new_dir_name = "PyFlowGraph $version"
114-
$zip_file_name = "PyFlowGraph_Windows_$version.zip"
114+
$artifact_dir_name = "PyFlowGraph-Windows-$version"
115115
116-
Write-Host "Renaming $dist_dir to $new_dir_name"
117-
Rename-Item -Path $dist_dir -NewName $new_dir_name -Force
116+
Write-Host "Renaming $dist_dir to $artifact_dir_name for artifact upload"
117+
Rename-Item -Path $dist_dir -NewName $artifact_dir_name -Force
118118
119-
$archive_source = Join-Path $build_dir $new_dir_name
120-
Write-Host "Creating archive from $archive_source"
121-
Compress-Archive -Path "$archive_source\*" -DestinationPath $zip_file_name -Force
119+
$artifact_path = Join-Path $build_dir $artifact_dir_name
120+
Write-Host "Artifact prepared at: $artifact_path"
122121
123-
echo "zip_name=$zip_file_name" >> $env:GITHUB_OUTPUT
122+
echo "artifact_path=$artifact_path" >> $env:GITHUB_OUTPUT
123+
echo "artifact_name=$artifact_dir_name" >> $env:GITHUB_OUTPUT
124124
echo "version=$version" >> $env:GITHUB_OUTPUT
125125
126126
- name: Upload build artifact
127127
if: startsWith(github.ref, 'refs/tags/')
128128
uses: actions/upload-artifact@v4
129129
with:
130130
name: PyFlowGraph-Windows-${{ steps.package.outputs.version }}
131-
path: ${{ steps.package.outputs.zip_name }}
131+
path: ${{ steps.package.outputs.artifact_path }}
132132
retention-days: 90
133-
compression-level: 0 # Already compressed
134133

135134
- name: Build summary (Tag Build)
136135
if: startsWith(github.ref, 'refs/tags/')
137136
run: |
138137
echo "## Tag Build Complete" >> $GITHUB_STEP_SUMMARY
139138
echo "" >> $GITHUB_STEP_SUMMARY
140139
echo "**Version:** ${{ steps.package.outputs.version }}" >> $GITHUB_STEP_SUMMARY
141-
echo "**Artifact:** ${{ steps.package.outputs.zip_name }}" >> $GITHUB_STEP_SUMMARY
140+
echo "**Artifact:** ${{ steps.package.outputs.artifact_name }}" >> $GITHUB_STEP_SUMMARY
142141
echo "" >> $GITHUB_STEP_SUMMARY
143142
echo "### Next Steps:" >> $GITHUB_STEP_SUMMARY
144143
echo "1. Download the artifact from this build to test locally" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,7 @@ python_runtime
112112

113113
# Ignore Claude AI files
114114
.claude/
115-
.claude_code/
115+
.claude_code/
116+
117+
# pre releases
118+
pre-release

0 commit comments

Comments
 (0)