MegaBites-AI/Windows-powershell
0372
1name: Windows Packaging (Reusable)2 3on:4 workflow_call:5 6env:7 GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"8 DOTNET_CLI_TELEMETRY_OPTOUT: 19 POWERSHELL_TELEMETRY_OPTOUT: 110 DOTNET_NOLOGO: 111 __SuppressAnsiEscapeSequences: 112 nugetMultiFeedWarnLevel: none13 SYSTEM_ARTIFACTSDIRECTORY: ${{ github.workspace }}/artifacts14 BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts15 16permissions:17 contents: read18 19jobs:20 package:21 name: ${{ matrix.architecture }} - ${{ matrix.channel }}22 runs-on: windows-latest23 strategy:24 fail-fast: false25 matrix:26 include:27 - architecture: x6428 channel: preview29 runtimePrefix: win730 - architecture: x8631 channel: stable32 runtimePrefix: win733 - architecture: x8634 channel: preview35 runtimePrefix: win736 - architecture: arm6437 channel: preview38 runtimePrefix: win39 40 steps:41 - name: Checkout42 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.243 with:44 fetch-depth: 100045 46 - name: Capture Environment47 if: success() || failure()48 run: |49 Import-Module .\tools\ci.psm150 Show-Environment51 shell: pwsh52 53 - name: Capture PowerShell Version Table54 if: success() || failure()55 run: |56 $PSVersionTable57 shell: pwsh58 59 - name: Switch to Public Feeds60 if: success()61 run: |62 Import-Module .\tools\ci.psm163 Switch-PSNugetConfig -Source Public64 shell: pwsh65 66 - name: Setup .NET67 uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.068 with:69 global-json-file: ./global.json70 71 - name: Bootstrap72 if: success()73 run: |74 Import-Module .\tools\ci.psm175 Invoke-CIInstall -SkipUser76 shell: pwsh77 78 - name: Build and Package79 run: |80 Import-Module .\tools\ci.psm181 New-CodeCoverageAndTestPackage82 Invoke-CIFinish -Runtime ${{ matrix.runtimePrefix }}-${{ matrix.architecture }} -channel ${{ matrix.channel }}83 shell: pwsh84 85 - name: Upload Build Artifacts86 if: always()87 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.088 with:89 name: windows-packaging-${{ matrix.architecture }}-${{ matrix.channel }}90 path: |91 ${{ github.workspace }}/artifacts/**/*92 !${{ github.workspace }}/artifacts/**/*.pdb93 