-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (81 loc) · 3.14 KB
/
wf_Windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-powershell
# https://github.com/actions/upload-artifact#where-does-the-upload-go
name: PSAppDeployToolkit.Tools-Windows-PowerShell
on:
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
push:
paths-ignore:
- '**.md'
- 'docs/**'
permissions:
id-token: write # Require write permission to Fetch an OIDC token.
contents: read
jobs:
test:
name: Run Tests
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Display the path
shell: powershell
run: echo ${env:PATH}
- name: Version Display
shell: powershell
run: $PSVersionTable
# uncomment below to explore what modules/variables/env variables are available in the build image
# - name: Modules and Variables Display
# shell: powershell
# run: Get-Module -ListAvailable; (Get-Variable).GetEnumerator() | Sort-Object Name | Out-String; (Get-ChildItem env:*).GetEnumerator() | Sort-Object Name | Out-String
- name: NuGet Latest
shell: powershell
run: Install-PackageProvider -Name "NuGet" -Confirm:$false -Force -Verbose
- name: PowerShellGet Latest
shell: powershell
run: Install-Module -Name PowerShellGet -Repository PSGallery -Force
- name: Bootstrap
shell: powershell
run: ./actions_bootstrap.ps1
- name: Install AzureSignTool
run: dotnet tool install --global azuresigntool
- name: Azure Login
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Test and Build
shell: powershell
run: Invoke-Build -File .\src\PSAppDeployToolkit.Tools.build.ps1
- name: Upload pester results
uses: actions/upload-artifact@v4
with:
name: pester-results
path: .\src\Artifacts\testOutput
if-no-files-found: error
overwrite: true
- name: Upload code coverage results
uses: actions/upload-artifact@v4
with:
name: cc-results
path: .\src\Artifacts\ccReport
if-no-files-found: error
overwrite: true
- name: Upload module
uses: actions/upload-artifact@v4
with:
name: PSAppDeployToolkit.Tools
path: .\src\Artifacts\Module
if-no-files-found: error
overwrite: true