chore(deps): update all non-major dependencies #2749
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- '*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: true | |
NuGetDirectory: ${{ github.workspace}}/nuget | |
NuGetSource: "https://api.nuget.org/v3/index.json" | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
validate_bom: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate Code | |
run: ./eng/update-bom.ps1 | |
validate_readme: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- name: Validate Readme | |
run: ./eng/update-readme.ps1 | |
- name: Validate Tool Readme | |
run: ./eng/update-tool-readme.ps1 | |
validate_test_projects: | |
runs-on: windows-2025 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- name: Validate | |
run: .\eng\validate-testprojects-configuration.ps1 | |
create_nuget: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- run: dotnet build eng/packages.proj --configuration Release /p:IsOfficialBuild=true /bl:build.binlog -warnaserror | |
- run: dotnet publish src/Meziantou.Framework.InlineSnapshotTesting.Prompt.TaskDialog --configuration Release --os win /p:IsOfficialBuild=true "--output:${{runner.temp}}/prompt" /bl:publish-taskdialog.binlog | |
- run: dotnet publish src/Meziantou.Framework.InlineSnapshotTesting.Prompt.NotificationTray --configuration Release --os win /p:IsOfficialBuild=true "--output:${{runner.temp}}/prompt" /bl:publish-notificationtray.binlog | |
- run: dotnet pack eng/packages.proj --configuration Release /p:IsOfficialBuild=true --output ${{ env.NuGetDirectory }} /p:RepositoryBranch="${{github.ref}}" "/p:PromptFolder=${{runner.temp}}/prompt" /bl:pack.binlog | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: nuget | |
if-no-files-found: error | |
retention-days: 3 | |
path: ${{ env.NuGetDirectory }}/**/* | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: binlog | |
if-no-files-found: error | |
retention-days: 3 | |
path: '**/*.binlog' | |
validate_nuget: | |
runs-on: ubuntu-24.04 | |
needs: [ create_nuget ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- uses: actions/download-artifact@v4 | |
with: | |
name: nuget | |
path: ${{ env.NuGetDirectory }} | |
- name: Validate NuGet packages | |
run: .\eng\validate-nuget.ps1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build_and_test: | |
runs-on: ${{ matrix.runs-on }} | |
timeout-minutes: 60 | |
env: | |
TestResultsDirectory: ${{ github.workspace}}/TestResults | |
strategy: | |
matrix: | |
# x64, arm64 | |
runs-on: [ windows-2025, ubuntu-24.04, ubuntu-24.04-arm, macos-15 ] | |
configuration: [ Debug, Release ] | |
additionalArguments: [ "", "/p:InvariantGlobalization=true" ] | |
architecture: [""] | |
# x86 | |
include: | |
- runs-on: windows-2025 | |
configuration: Debug | |
architecture: x86 | |
- runs-on: windows-2025 | |
configuration: Debug | |
architecture: x86 | |
additionalArguments: "/p:InvariantGlobalization=true" | |
- runs-on: windows-2025 | |
configuration: Release | |
architecture: x86 | |
- runs-on: windows-2025 | |
configuration: Release | |
architecture: x86 | |
additionalArguments: "/p:InvariantGlobalization=true" | |
fail-fast: false | |
steps: | |
- id: compute-artifact-name | |
name: Compute artifact name | |
run: | | |
$Name = "test-results-${{ matrix.runs-on }}-${{ matrix.configuration }}-${{matrix.architecture}}-${{matrix.additionalArguments}}".Replace(":", "_").Replace("/", "_") | |
"artifact-name=$Name" >> $env:GITHUB_OUTPUT | |
- uses: actions/checkout@v4 | |
- run: git config --global protocol.file.allow always | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
with: | |
architecture: ${{ matrix.architecture }} | |
- name: PATH | |
run: echo $env:PATH | |
- name: .NET info | |
run: dotnet --info | |
- name: Build | |
env: | |
# Attempt to reduce flakiness on x86 because of limited RAM | |
AdditionalArgs: ${{ matrix.architecture == 'x86' && '-maxcpucount:1' || '' }} | |
run: dotnet build eng/build.proj --configuration ${{ matrix.configuration }} /bl ${{ env.AdditionalArgs }} ${{ matrix.additionalArguments }} | |
- name: List environment variables | |
run: "Get-ChildItem env: | Sort-Object Name" | |
- name: Run tests | |
env: | |
# Attempt to reduce flakiness on x86 because of limited RAM | |
TestTfmsInParallel: ${{ matrix.architecture == 'x86' && 'false' || 'true' }} | |
AdditionalArgs: ${{ matrix.architecture == 'x86' && '-maxcpucount:1' || '' }} | |
run: dotnet test eng/build.proj --configuration ${{ matrix.configuration }} --no-build --logger trx --results-directory "${{ env.TestResultsDirectory }}" --collect:"Code Coverage" --blame-hang --blame-hang-timeout 5min ${{ env.AdditionalArgs }} ${{ matrix.additionalArguments }} | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ steps.compute-artifact-name.outputs.artifact-name }} | |
if-no-files-found: error | |
retention-days: 3 | |
path: | | |
**/*.binlog | |
${{ env.TestResultsDirectory }}/**/* | |
test_trimming: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
# https://docs.microsoft.com/en-us/dotnet/core/rid-catalog | |
runtime: [ "win-x64", "win-x86", "linux-x64", "osx-x64" ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- run: dotnet publish --configuration Release --runtime ${{ matrix.runtime }} --self-contained Samples/Trimmable/Trimmable.csproj | |
test_trimming_wpf: | |
runs-on: windows-2025 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
runtime: [ "win-x64", "win-x86" ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- run: dotnet publish --configuration Release --runtime ${{ matrix.runtime }} --self-contained Samples/Trimmable.Wpf/Trimmable.Wpf.csproj | |
merge_coverage: | |
runs-on: ubuntu-24.04 | |
needs: [build_and_test] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- name: Install dotnet-coverage | |
run: dotnet tool update --global dotnet-coverage | |
- name: Download test results | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: test-results-* | |
path: test-results | |
- name: Merge coverage files (format coverage) | |
run: dotnet-coverage merge --output test-result.coverage --output-format coverage (Get-ChildItem test-results -Recurse -Filter "*.coverage") | |
- name: Merge coverage files (format cobertura) | |
run: dotnet-coverage merge --output test-result.cobertura.xml --output-format cobertura (Get-ChildItem test-results -Recurse -Filter "*.coverage") | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage | |
if-no-files-found: error | |
retention-days: 3 | |
path: | | |
test-result.coverage | |
test-result.cobertura.xml | |
deploy: | |
runs-on: ubuntu-24.04 | |
needs: [ validate_bom, validate_readme, validate_test_projects, validate_nuget, build_and_test, test_trimming, test_trimming_wpf ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: ./.github/setup-dotnet | |
- uses: actions/download-artifact@v4 | |
with: | |
name: nuget | |
path: ${{ env.NuGetDirectory }} | |
- run: | | |
Write-Host "Current ref: $env:GITHUB_REF" | |
Write-Host "Searching nupkg in folder: ${{ env.NuGetDirectory }}" | |
$files = Get-ChildItem "${{ env.NuGetDirectory }}/*" -Include *.nupkg | |
foreach($file in $files) { | |
Write-Host "Pushing NuGet package: $($file.FullName)" | |
if ($env:GITHUB_REF -eq 'refs/heads/main') | |
{ | |
& dotnet nuget push "$($file.FullName)" --api-key "$env:NUGETAPIKEY" --source ${{ env.NuGetSource }} --force-english-output --skip-duplicate | |
} | |
else | |
{ | |
& dotnet nuget push "$($file.FullName)" --api-key "$env:FEEDZ_APIKEY" --source "https://f.feedz.io/meziantou/meziantou-framework/nuget/index.json" --force-english-output --skip-duplicate | |
} | |
} | |
name: Publish NuGet packages | |
if: always() | |
env: | |
NUGETAPIKEY: ${{ secrets.NUGETAPIKEY }} | |
FEEDZ_APIKEY: ${{ secrets.FEEDZ_APIKEY }} |