UPD: ci.yml

This commit is contained in:
holek363
2025-11-20 13:53:16 +01:00
parent e2318f2691
commit 43c8340e0b

View File

@@ -4,24 +4,13 @@ on: [push]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
rid: ["win-x64", "linux-x64"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3 - uses: actions/setup-dotnet@v3
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- run: dotnet restore - run: dotnet restore
- run: dotnet build - run: dotnet publish ./Lab7.csproj -c Release -o app -r ${{ matrix.rid }} -p:PublishSingleFile=true -p:AssemblyName=app
- run: dotnet test
- run: dotnet publish ./Lab7.csproj -c Release -o app -r linux-x64 -p:PublishSingleFile=true -p:AssemblyName=app
- run: tar cf app.tar app/
- uses: actions/upload-artifact@v3
with:
name: app.tar
path: app.tar
test:
steps:
- uses: actions/download-artifact@v3
with:
name: app.tar
- run: tar xf app.tar/app.tar
- run: ./app/app