name: Build and Test on: push: branches: [ master, main ] pull_request: branches: [ master, main ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '10.0.x' - name: Restore dependencies run: dotnet restore NixWslWrapper.slnx - name: Build solution run: dotnet build NixWslWrapper.slnx --configuration Release --no-restore - name: Run unit tests run: dotnet test NixWslWrapper.slnx --configuration Release --no-build --verbosity normal - name: Publish single-file executable run: dotnet publish src/NixWslWrapper.Cli/NixWslWrapper.Cli.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o ./dist - name: Upload nix.exe artifact uses: actions/upload-artifact@v3 with: name: nix-windows-wrapper path: ./dist/nix.exe