mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Integrate Windows packaging into windows-ci workflow using reusable workflow (#26224)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
This commit is contained in:
co-authored by
TravisEz13
Travis Plunk
parent
2786fceb3a
commit
0d5d7deeff
@@ -41,6 +41,8 @@ env:
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
__SuppressAnsiEscapeSequences: 1
|
||||
nugetMultiFeedWarnLevel: none
|
||||
SYSTEM_ARTIFACTSDIRECTORY: ${{ github.workspace }}/artifacts
|
||||
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts
|
||||
jobs:
|
||||
changes:
|
||||
name: Change Detection
|
||||
@@ -54,6 +56,7 @@ jobs:
|
||||
# Set job outputs to values from filter step
|
||||
outputs:
|
||||
source: ${{ steps.filter.outputs.source }}
|
||||
packagingChanged: ${{ steps.filter.outputs.packagingChanged }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v5
|
||||
@@ -158,6 +161,12 @@ jobs:
|
||||
fetch-depth: 1000
|
||||
- name: Verify xUnit test results
|
||||
uses: "./.github/actions/test/verify_xunit"
|
||||
windows_packaging:
|
||||
name: Windows Packaging
|
||||
needs:
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.packagingChanged == 'true' }}
|
||||
uses: ./.github/workflows/windows-packaging-reusable.yml
|
||||
ready_to_merge:
|
||||
name: windows ready to merge
|
||||
needs:
|
||||
@@ -166,6 +175,7 @@ jobs:
|
||||
- windows_test_elevated_others
|
||||
- windows_test_unelevated_ci
|
||||
- windows_test_unelevated_others
|
||||
- windows_packaging
|
||||
if: always()
|
||||
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
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
|
||||
|
||||
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@v5
|
||||
with:
|
||||
fetch-depth: 1000
|
||||
|
||||
- name: Capture Environment
|
||||
if: success() || failure()
|
||||
run: |
|
||||
Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
|
||||
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@v4
|
||||
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@v4
|
||||
with:
|
||||
name: windows-packaging-${{ matrix.architecture }}-${{ matrix.channel }}
|
||||
path: |
|
||||
${{ github.workspace }}/artifacts/**/*
|
||||
!${{ github.workspace }}/artifacts/**/*.pdb
|
||||
Reference in New Issue
Block a user