Fix Gitea Actions container checkout failure by using setup-dotnet and deploy wrapper binary as build artifact
Build and Test / build (push) Failing after 57s
Build and Test / build (push) Failing after 57s
This commit is contained in:
+14
-2
@@ -9,12 +9,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup .NET SDK
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore NixWslWrapper.sln
|
run: dotnet restore NixWslWrapper.sln
|
||||||
|
|
||||||
@@ -23,3 +26,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: dotnet test NixWslWrapper.sln --configuration Release --no-build --verbosity normal
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user