This commit is contained in:
Michał Zieliński
2025-09-12 12:03:28 +02:00
parent c5d1a9fd28
commit bb92d535bf

View File

@@ -2,9 +2,9 @@ name: BuildApp
on:
# push:
# branches: [ main ]
# branches: [ main ]
# pull_request:
#branches: [ main ]
#branches: [ main ]
workflow_dispatch: {}
# (opcjonalnie) ogranicz równoległe runy
@@ -16,18 +16,22 @@ jobs:
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
uses: https://github.com/actions/setup-node@v4
with:
node-version: 20
# Zostawiamy jak u Ciebie, jeśli chcesz można też użyć corepack (pnpm) zamiast global install
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install PNPM
run: npm install -g pnpm
# alternatywa:
# run: corepack enable && corepack prepare pnpm@latest --activate
- name: Install dependencies
working-directory: src/Frontend
@@ -49,10 +53,11 @@ jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
uses: https://github.com/actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
@@ -83,13 +88,14 @@ jobs:
--filter "Category!=LocalOnly"
- name: Publish Test Results
uses: actions/upload-artifact@v4
uses: https://github.com/actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: |
src/Backend/DiunaBI.Tests/TestResults/*.trx
src/Backend/DiunaBI.Tests/TestResults/**/coverage.cobertura.xml
retention-days: 7
- name: Publish WebAPI
if: success()
@@ -100,10 +106,8 @@ jobs:
--framework net8.0 \
--self-contained false \
--output ../../build/webapi
# Kopiuj pluginy do katalogu webapi
mkdir -p ../../build/webapi/Plugins
cp DiunaBI.Plugins.Morska/bin/Release/net8.0/DiunaBI.Plugins.Morska.dll ../../build/webapi/Plugins/
echo "✅ Plugins copied to webapi:"
ls -la ../../build/webapi/Plugins/
- name: Clean up sensitive files