diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index eb5038f..fc5a395 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,12 +9,15 @@ on: jobs: build: runs-on: ubuntu-latest - container: - image: mcr.microsoft.com/dotnet/sdk:10.0 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.sln @@ -23,3 +26,12 @@ jobs: - name: Run unit tests run: dotnet test NixWslWrapper.sln --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