Skip to content

build(deps): bump actions/setup-dotnet from 5 to 6 #29

build(deps): bump actions/setup-dotnet from 5 to 6

build(deps): bump actions/setup-dotnet from 5 to 6 #29

Workflow file for this run

name: CI
# Build + test + packaging validation on every push/PR. Publishing lives in release.yml
# (NuGet packages on v* tags); docs publishing lives in docs.yml.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-test:
name: Build & test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
# The library multi-targets net8.0/net9.0/net10.0, so all three SDKs are needed to build and
# run-test every TFM. The latest SDK (10) drives the build.
- name: Setup .NET (8 / 9 / 10)
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore
run: dotnet restore YandexMusic.slnx
- name: Build (Release)
run: dotnet build YandexMusic.slnx -c Release --no-restore
- name: Test (all TFMs)
run: dotnet test YandexMusic.slnx -c Release --no-build --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}
path: '**/*.trx'
if-no-files-found: ignore
# Pack here too so a packaging break (missing README/icon, CS1591, etc.) fails CI, not release.
# Only IsPackable=true projects are produced: YandexMusic and YandexMusic.DependencyInjection.
# Built once (on Linux) — the packages are platform-agnostic (netX.0, no RID-specific assets).
- name: Pack (validation only)
if: matrix.os == 'ubuntu-latest'
run: dotnet pack YandexMusic.slnx -c Release --no-build -o artifacts
- name: Upload packages
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v7
with:
name: nuget-packages
path: artifacts/*.nupkg
if-no-files-found: ignore
# Build the sample player as a self-contained Windows CLI on every push, and upload it as a
# version-named workflow artifact (the version is MinVer's, read from the published exe). Runs on
# Windows so the player's net*-windows TFM (real NAudio playback) is the one that ships.
player:
name: Build player (CLI artifact)
if: github.event_name == 'push'
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup .NET 10
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Publish (win-x64, self-contained, single file)
run: >
dotnet publish samples/YandexMusic.Player/YandexMusic.Player.csproj
-c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o publish/player
- name: Package (name the zip with the MinVer version)
id: package
shell: pwsh
run: |
$exe = Get-ChildItem publish/player/yandexmusic-player.exe
$version = ($exe.VersionInfo.ProductVersion -split '\+')[0]
$zip = "yandexmusic-player-$version-win-x64.zip"
Compress-Archive -Path publish/player/* -DestinationPath $zip
"name=yandexmusic-player-$version-win-x64" >> $env:GITHUB_OUTPUT
- name: Upload player artifact
uses: actions/upload-artifact@v7
with:
name: ${{ steps.package.outputs.name }}
path: yandexmusic-player-*-win-x64.zip
if-no-files-found: error