Conversation
Reviewer's GuideIntroduce a new GitHub Actions workflow that manually builds, packages, and drafts releases of platform-specific executables using PyInstaller and Poetry. Sequence Diagram for the Alt Build Executables Workflow ExecutionsequenceDiagram
actor Developer
participant GA as GitHub Actions
participant Runner as GitHub Runner (Windows)
participant Poetry
participant PyInstaller
participant Artifacts as GitHub Artifact Storage
participant GHReleases as GitHub Releases
Developer->>GA: Manually triggers "Alt Build Executables" workflow
GA->>Runner: Start "build" job
Runner->>Runner: Checkout code (actions/checkout@v4)
Runner->>Runner: Set up Python (actions/setup-python@v5)
Runner->>Poetry: Install Poetry (snok/install-poetry@v1)
Runner->>Poetry: Install dependencies (poetry install --with=dev)
Runner->>PyInstaller: Build executables (e.g., tdwii_config_dump.exe, eScheduler.exe)
PyInstaller-->>Runner: Return built executables to dist/
Runner->>Runner: Copy configuration files to dist/
Runner->>Runner: Create distribution package (Compress-Archive dist/ to twdii_plus_examples.zip)
Runner->>Artifacts: Upload artifact "twdii_plus_examples.zip" (actions/upload-artifact@v4)
Artifacts-->>Runner: Confirm upload
alt If on 'main' branch
Runner->>GHReleases: Create Draft Release (softprops/action-gh-release@v1)
GHReleases-->>Runner: Confirm draft release creation
Runner->>GHReleases: Upload "twdii_plus_examples.zip" to release files
GHReleases-->>Runner: Confirm file upload
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @sjswerdloff - I've reviewed your changes - here's some feedback:
- Either remove or un-comment the macOS/Linux build steps to avoid dead code and keep the workflow file clean.
- Fix the inconsistent naming between “twdii_plus_examples.zip” and “tdwii_plus_examples” to match your project’s naming convention.
- Consider adding caching for Poetry’s virtualenv or dependencies to speed up subsequent workflow runs.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| run: | | ||
| Compress-Archive -Path "dist/config" -DestinationPath "dist/config.zip" -Force | ||
| Remove-Item -Path "dist/config" -Force | ||
| Compress-Archive -Path "dist/" -DestinationPath "./twdii_plus_examples.zip" -Force |
There was a problem hiding this comment.
issue (typo): Inconsistent project prefix typo in zip filename
Update twdii_plus_examples.zip to tdwii_plus_examples.zip to match the project's prefix.
Suggested implementation:
Compress-Archive -Path "dist/" -DestinationPath "./tdwii_plus_examples.zip" -Force
Copy-Item -Path "./tdwii_plus_examples.zip" -DestinationPath "dist/" -Force
name: tdwii_plus_examples.zip
path: dist/tdwii_plus_examples.zip
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: twdii_plus_examples.zip |
There was a problem hiding this comment.
issue (typo): Zip artifact name typo
Fix the typo in the artifact name to match the filename and project naming conventions.
Suggested implementation:
with:
name: twdii-plus-examples.zip
path: dist/twdii_plus_examples.zip
If you want the path to also reflect hyphens (and you’ve renamed the zip earlier in the script), update any Compress-Archive and Copy-Item calls that reference twdii_plus_examples.zip to twdii-plus-examples.zip.
Summary by Sourcery
Introduce a manual GitHub Actions workflow to build, package, and release Windows executables for tdwii_plus_examples using Python, Poetry, and PyInstaller.
Build:
CI:
Deployment: