diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 18687ea..41e66c5 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -3,26 +3,29 @@ on: [push] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + rid: ["win-x64", "linux-x64"] # Macierz dla dwóch platform steps: + # Pobierz kod źródłowy z repozytorium - uses: actions/checkout@v4 + + # Skonfiguruj .NET SDK w wersji 8.0.x - uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' + + # Przywróć zależności - run: dotnet restore - - run: dotnet build - - run: dotnet test - - run: dotnet publish -o app -r linux-x64 --sc /p:PublishSingleFile=true,AssemblyName=app - - run: tar cf app.tar app/ + + # Kompiluj i publikuj aplikację dla odpowiedniej platformy + - run: dotnet publish -o app-${{ matrix.rid }} -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true + + # Archiwizuj wyniki kompilacji do pliku .tar + - run: tar -cvf app-${{ matrix.rid }}.tar app-${{ matrix.rid }} + + # Wyślij artefakty do systemu CI - uses: actions/upload-artifact@v3 with: - name: app.tar - path: app.tar - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v3 - with: - name: app.tar - - run: tar xf app.tar - - run: ./app/app + name: app-${{ matrix.rid }} + path: app-${{ matrix.rid }}.tar