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