Skip to content

Update github actions #484

Update github actions

Update github actions #484

Workflow file for this run

name: build
on: [push, pull_request]
env:
NAME: Hourglass
NAUDIO: Hourglass.NAudio
NAUDIO_ARTIFACT: NAudioHourglassPack
CONFIG: Release
CONFIG_PORTABLE: Release Portable
FW: net48
COMPRESSION_LEVEL: 9
RETENTION_DAYS: 30
jobs:
build:
runs-on: windows-latest
steps:
# Set up
- name: Setup msbuild
uses: microsoft/setup-msbuild@v2
# Check out
- name: Check out ${{env.NAME}}
uses: actions/checkout@v4.2.2
# Restore
- name: Restore ${{env.NAME}}.sln
run: dotnet restore ${{env.NAME}}.sln
# Build
- name: Build ${{env.NAME}} ${{env.CONFIG_PORTABLE}}
run: msbuild /p:Configuration="${{env.CONFIG_PORTABLE}}" ${{env.NAME}}.sln
- name: Build ${{env.NAME}} ${{env.CONFIG}}
run: msbuild /p:Configuration="${{env.CONFIG}}" ${{env.NAME}}.sln
# Test
- name: Test ${{env.NAME}} ${{env.CONFIG_PORTABLE}}
run: dotnet test --configuration "${{env.CONFIG_PORTABLE}}" --no-build --verbosity normal
- name: Create ${{env.NAME}} ${{env.CONFIG_PORTABLE}} test report
uses: dorny/test-reporter@v1.9.1
if: ${{success() || failure()}}
with:
name: tests
path: '**/*.trx'
reporter: dotnet-trx
# Upload artifacts
- name: Publish ${{env.NAME}} ${{env.CONFIG}} Installer
uses: actions/upload-artifact@v4.4.3
with:
name: ${{env.NAME}}Installer
path: |
${{env.NAME}}.Bundle/bin/${{env.CONFIG}}/${{env.NAME}}Installer.exe
compression-level: ${{env.COMPRESSION_LEVEL}}
retention-days: ${{env.RETENTION_DAYS}}
- name: Publish ${{env.NAME}} ${{env.CONFIG_PORTABLE}}
uses: actions/upload-artifact@v4.4.3
with:
name: ${{env.NAME}}Portable
path: |
${{env.NAME}}/bin/${{env.CONFIG_PORTABLE}}/${{env.FW}}/${{env.NAME}}.exe
${{env.NAME}}/bin/${{env.CONFIG_PORTABLE}}/${{env.FW}}/${{env.NAME}}.exe.config
${{env.NAME}}/bin/${{env.CONFIG_PORTABLE}}/${{env.FW}}/ngen-${{env.NAME}}.bat
compression-level: ${{env.COMPRESSION_LEVEL}}
retention-days: ${{env.RETENTION_DAYS}}
- name: Publish ${{env.NAUDIO}}
uses: actions/upload-artifact@v4.4.3
with:
name: ${{env.NAUDIO_ARTIFACT}}
path: |
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/Hourglass.NAudio.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/Microsoft.Win32.Registry.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/NAudio.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/NAudio.Core.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/NAudio.Vorbis.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/NAudio.Wasapi.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/NAudio.WinMM.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/NVorbis.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/System.Buffers.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/System.Memory.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/System.Numerics.Vectors.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/System.Runtime.CompilerServices.Unsafe.dll
${{env.NAUDIO}}/bin/${{env.CONFIG}}/${{env.FW}}/System.ValueTuple.dll
compression-level: ${{env.COMPRESSION_LEVEL}}
retention-days: ${{env.RETENTION_DAYS}}