forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (80 loc) · 2.52 KB
/
windows-packaging-reusable.yml
File metadata and controls
92 lines (80 loc) · 2.52 KB
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
82
83
84
85
86
87
88
89
90
91
92
name: Windows Packaging (Reusable)
on:
workflow_call:
env:
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
__SuppressAnsiEscapeSequences: 1
nugetMultiFeedWarnLevel: none
SYSTEM_ARTIFACTSDIRECTORY: ${{ github.workspace }}/artifacts
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts
permissions:
contents: read
jobs:
package:
name: ${{ matrix.architecture }} - ${{ matrix.channel }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- architecture: x64
channel: preview
runtimePrefix: win7
- architecture: x86
channel: stable
runtimePrefix: win7
- architecture: x86
channel: preview
runtimePrefix: win7
- architecture: arm64
channel: preview
runtimePrefix: win
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1000
- name: Capture Environment
if: success() || failure()
run: |
Import-Module .\tools\ci.psm1
Show-Environment
shell: pwsh
- name: Capture PowerShell Version Table
if: success() || failure()
run: |
$PSVersionTable
shell: pwsh
- name: Switch to Public Feeds
if: success()
run: |
Import-Module .\tools\ci.psm1
Switch-PSNugetConfig -Source Public
shell: pwsh
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: ./global.json
- name: Bootstrap
if: success()
run: |
Import-Module .\tools\ci.psm1
Invoke-CIInstall -SkipUser
shell: pwsh
- name: Build and Package
run: |
Import-Module .\tools\ci.psm1
New-CodeCoverageAndTestPackage
Invoke-CIFinish -Runtime ${{ matrix.runtimePrefix }}-${{ matrix.architecture }} -channel ${{ matrix.channel }}
shell: pwsh
- name: Upload Build Artifacts
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: windows-packaging-${{ matrix.architecture }}-${{ matrix.channel }}
path: |
${{ github.workspace }}/artifacts/**/*
!${{ github.workspace }}/artifacts/**/*.pdb