Skip to content

Commit 247acb7

Browse files
committed
Switch workflow shell from powershell to pwsh
Updated all GitHub Actions workflow steps to use 'pwsh' instead of 'powershell' for improved compatibility and consistency with PowerShell Core. This affects update-manifest.yml, update-module.yml, and validate-module.yml.
1 parent aa956ee commit 247acb7

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/update-manifest.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ jobs:
3939

4040
# Uninstall existing VcRedists
4141
- name: Uninstall VcRedists
42-
shell: powershell
42+
shell: pwsh
4343
run: |
4444
Import-Module ${{ github.workspace }}\VcRedist -Force
4545
Get-InstalledVcRedist | Uninstall-VcRedist -Confirm:$False -Verbose
4646
4747
# Validate VcRedist 2017 and update the manifest
4848
- name: Validate VcRedist 2017
49-
shell: powershell
49+
shell: pwsh
5050
run: |
5151
$Release = "2017"
5252
Import-Module "${{ github.workspace }}\VcRedist" -Force
@@ -61,7 +61,7 @@ jobs:
6161
6262
# Validate VcRedist 2019 and update the manifest
6363
- name: Validate VcRedist 2019
64-
shell: powershell
64+
shell: pwsh
6565
run: |
6666
$Release = "2019"
6767
Import-Module "${{ github.workspace }}\VcRedist" -Force
@@ -76,7 +76,7 @@ jobs:
7676
7777
# Validate VcRedist 2022 and update the manifest
7878
- name: Validate VcRedist 2022
79-
shell: powershell
79+
shell: pwsh
8080
run: |
8181
$Release = "2022"
8282
Import-Module "${{ github.workspace }}\VcRedist" -Force
@@ -92,7 +92,7 @@ jobs:
9292
# Format the date number for the commit message
9393
- name: Get date
9494
id: get-date
95-
shell: powershell
95+
shell: pwsh
9696
run: |
9797
echo "date=$(Get-Date -Format "yyyy-MM-dd")" >> $GITHUB_STATE
9898
@@ -125,7 +125,7 @@ jobs:
125125

126126
# Pull latest changes from validate-amd64 job
127127
- name: Pull latest changes
128-
shell: powershell
128+
shell: pwsh
129129
run: |
130130
git pull origin development
131131
@@ -146,14 +146,14 @@ jobs:
146146

147147
# Uninstall existing VcRedists
148148
- name: Uninstall VcRedists
149-
shell: powershell
149+
shell: pwsh
150150
run: |
151151
Import-Module ${{ github.workspace }}\VcRedist -Force
152152
Get-InstalledVcRedist | Uninstall-VcRedist -Confirm:$False -Verbose
153153
154154
# Validate VcRedist 2022 and update the manifest
155155
- name: Validate VcRedist 2022
156-
shell: powershell
156+
shell: pwsh
157157
run: |
158158
$Release = "2022"
159159
$Architecture = "arm64"
@@ -171,7 +171,7 @@ jobs:
171171
# Format the date number for the commit message
172172
- name: Get date
173173
id: get-date
174-
shell: powershell
174+
shell: pwsh
175175
run: |
176176
echo "date=$(Get-Date -Format "yyyy-MM-dd")" >> $GITHUB_STATE
177177

.github/workflows/update-module.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
uses: potatoqualitee/psmodulecache@v6.2.1
2424
with:
2525
modules-to-cache: MarkdownPS
26-
shell: powershell
26+
shell: pwsh
2727

2828
# Update the version number in the module manifest
2929
- name: Update module version number
3030
id: update-version
31-
shell: powershell
31+
shell: pwsh
3232
run: |
3333
$modulePath = "${{ github.workspace }}\VcRedist"
3434
$manifestPath = "${{ github.workspace }}\VcRedist\VcRedist.psd1"
@@ -51,7 +51,7 @@ jobs:
5151
# Update the change log with the new version number
5252
- name: Update CHANGELOG.md
5353
id: update-changelog
54-
shell: powershell
54+
shell: pwsh
5555
run: |
5656
$changeLog = "${{ github.workspace }}\docs\changelog.md"
5757
$replaceString = "^## VERSION$"
@@ -66,7 +66,7 @@ jobs:
6666
# Update the docs with the new version number and supported VcRedists
6767
- name: Update VERSIONS.md
6868
id: update-versions
69-
shell: powershell
69+
shell: pwsh
7070
run: |
7171
Import-Module "${{ github.workspace }}\VcRedist" -Force
7272
$VcRedists = Get-Vclist -Export All | `

.github/workflows/validate-module.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
# Run Pester tests
2828
- name: Run Pester tests
29-
shell: powershell
29+
shell: pwsh
3030
working-directory: "${{ github.workspace }}"
3131
env:
3232
TENANT_ID: ${{ secrets.TENANT_ID }}
@@ -88,10 +88,10 @@ jobs:
8888
uses: potatoqualitee/psmodulecache@v6.2.1
8989
with:
9090
modules-to-cache: BuildHelpers
91-
shell: powershell
91+
shell: pwsh
9292

9393
- name: Update module version
94-
shell: powershell
94+
shell: pwsh
9595
working-directory: "${{ github.workspace }}"
9696
run: |
9797
Import-Module -Name BuildHelpers

0 commit comments

Comments
 (0)