Update dotnet.yml #206
Workflow file for this run
This file contains 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: .NET | |
on: | |
push: | |
branches: ["*"] | |
tags: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
rid: | |
- win-x64 | |
- linux-x64 | |
- osx-arm64 | |
runs-on: ${{ startsWith(matrix.rid, 'win-') && 'windows-latest' || startsWith(matrix.rid, 'osx-') && 'macos-latest' || 'ubuntu-latest' }} | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build | |
# Platform-specific custom steps | |
- name: Set up PulseAudio (Linux only) | |
if: matrix.rid == 'linux-x64' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pulseaudio | |
pulseaudio --start | |
pactl load-module module-null-sink sink_name=VirtualSink sink_properties=device.description=Virtual_Sink | |
pactl set-default-sink VirtualSink | |
# Platform-specific custom steps | |
- name: Set up Mac | |
if: matrix.rid == 'osx-arm64' | |
run: | | |
arch -arm64 brew install llvm | |
sudo gem install ffi | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
pack: | |
strategy: | |
matrix: | |
rid: | |
- win-arm64 | |
- win-x86 | |
- win-x64 | |
- linux-arm64 | |
- linux-x64 | |
- osx-arm64 | |
- osx-x64 | |
runs-on: ${{ startsWith(matrix.rid, 'win-') && 'windows-latest' || startsWith(matrix.rid, 'osx-') && 'macos-latest' || 'ubuntu-latest' }} | |
timeout-minutes: 10 | |
permissions: | |
actions: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Publish | |
run: cd Console && dotnet publish -c Release --runtime ${{ matrix.rid }} -o ./output | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: YoutubeConsole.${{ matrix.rid }} | |
path: ./Console/output | |
if-no-files-found: error | |