| 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 |
| 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 |
| 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 |
| with: |
| name: windows-packaging-${{ matrix.architecture }}-${{ matrix.channel }} |
| path: | |
| ${{ github.workspace }}/artifacts/**/* |
| !${{ github.workspace }}/artifacts/**/*.pdb |
| |