Fix GitHub Actions workflow to produce functional artifacts#1
Merged
lsd-techno merged 3 commits intomainfrom Sep 7, 2025
Merged
Conversation
Co-authored-by: lsd-techno <6795932+lsd-techno@users.noreply.github.com>
Co-authored-by: lsd-techno <6795932+lsd-techno@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] built artifact in actions is not functional for some reason
Fix GitHub Actions workflow to produce functional artifacts
Sep 7, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GitHub Actions workflow for building GateSwitchWay was producing artifacts that were non-functional due to several critical issues. This PR fixes all identified problems to ensure the built executables work correctly on target Windows systems.
Issues Fixed
1. Workflow Filename Typo
The workflow file was incorrectly named
publush.ymlinstead ofpublish.yml, which could cause confusion and maintenance issues.2. PowerShell Version Detection Bug
The version detection logic had a critical flaw:
This was causing executables to be named
GateSwitchWay-True.exeinstead ofGateSwitchWay-0.0.0.exe.3. Build Tool Compatibility Issues
The workflow was using
dotnet-warpwhich has known compatibility issues with Windows Forms applications that require administrator privileges. This often results in executables that fail to run or have missing dependencies.4. Missing Self-Contained Configuration
The published artifacts weren't truly self-contained, potentially missing required .NET runtime components or native libraries.
Technical Solution
Replaced the dotnet-warp approach with native .NET single-file publishing:
Key improvements:
Validation & Quality Assurance
Added comprehensive validation steps to catch build failures early:
Expected Results
The workflow now produces:
Users can now download artifacts from GitHub Actions and run them directly on Windows systems (with administrator privileges) without any additional setup or dependency installation.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.