Enable the execution of GitHub Actions workflows using Windows PowerShell.
Why we need the feature
Currently, GitHub Actions workflows are predominantly optimized for environments like Ubuntu and Mac, with limited support for Windows PowerShell. This limitation affects developers who rely on Windows-specific tools and scripts, reducing the efficiency and flexibility of continuous integration and deployment processes on Windows platforms. By enabling GitHub Actions to run smoothly with Windows PowerShell, we can provide a more robust and versatile CI/CD pipeline that caters to a broader range of development environments.
How to implement and why
Update Workflow Configuration:
Modify existing workflow YAML files or create new ones to specify powershell as the shell for relevant job steps.
Develop PowerShell scripts to handle Windows-specific build and deployment tasks.
Ensure scripts are placed in a directory accessible to the workflow, such as a scripts folder within the repository.
Configure Dependencies and Environment:
Install necessary dependencies using PowerShell commands within the workflow.
Example:
Install-Module -Name SomeModule -Force
Handle Environment Variables:
Set and manage environment variables within PowerShell to ensure that builds and deployments have the necessary context.
Example:
$Env:QT_QPA_PLATFORM = 'offscreen'
Testing and Validation:
Create test workflows to validate the PowerShell integration.
Use matrix strategies to test across different Windows environments and configurations.
Example:
strategy:
matrix:
python-version: [3.9]
Documentation and References:
Update repository documentation to include guidelines on using PowerShell with GitHub Actions.
Reference helpful resources and examples to assist developers in setting up their workflows.
About backward compatibility
Implementing Windows PowerShell support in GitHub Actions will not affect existing workflows running on other operating systems like Ubuntu and Mac. The changes are additive and allow developers to choose the appropriate environment for their needs. By maintaining separate job configurations for different shells and environments, we ensure that current CI/CD processes remain stable and unaffected.
Resolves #38
What is the feature
Enable the execution of GitHub Actions workflows using Windows PowerShell.
Why we need the feature
Currently, GitHub Actions workflows are predominantly optimized for environments like Ubuntu and Mac, with limited support for Windows PowerShell. This limitation affects developers who rely on Windows-specific tools and scripts, reducing the efficiency and flexibility of continuous integration and deployment processes on Windows platforms. By enabling GitHub Actions to run smoothly with Windows PowerShell, we can provide a more robust and versatile CI/CD pipeline that caters to a broader range of development environments.
How to implement and why
Update Workflow Configuration:
powershell
as the shell for relevant job steps.Example:
Incorporate PowerShell Scripts:
scripts
folder within the repository.Configure Dependencies and Environment:
Handle Environment Variables:
Testing and Validation:
Documentation and References:
About backward compatibility
Implementing Windows PowerShell support in GitHub Actions will not affect existing workflows running on other operating systems like Ubuntu and Mac. The changes are additive and allow developers to choose the appropriate environment for their needs. By maintaining separate job configurations for different shells and environments, we ensure that current CI/CD processes remain stable and unaffected.
Test these changes locally