Skip to content

Rename release file #262

Rename release file

Rename release file #262

Workflow file for this run

name: .NET
on:
push:
branches: ["main"]
tags: ["*"]
paths-ignore:
- "**.md"
pull_request:
branches: ["*"]
paths-ignore:
- "**.md"
permissions:
contents: write
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: Install dependencies
run: |
dotnet restore
- name: Build Release
run: dotnet build --configuration Release --no-restore
# 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
- name: Test
run: dotnet test --verbosity normal --configuration Release
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: write
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: Set execution permission
if: ${{ !startsWith(matrix.rid, 'win-') }}
run: chmod +x ./Console/output/Console
- name: Rename file
if: ${{ !startsWith(matrix.rid, 'win-') }}
run: |
FILE=$(find ./Console/output -type f -name 'Console*')
if [ -f "$FILE" ]; then
mv "$FILE" "./Console/output/Console-${{ matrix.rid }}}"
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: YoutubeConsole.${{ matrix.rid }}
path: ./Console/output
if-no-files-found: error
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./Console/output/Console*