update build
This commit is contained in:
53
.github/workflows/build.yml
vendored
53
.github/workflows/build.yml
vendored
@@ -7,26 +7,24 @@ on:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@master
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Install Angular CLI
|
||||
run: yarn global add @angular/cli
|
||||
run: npm install -g @angular/cli
|
||||
|
||||
- name: Configure ng to use yarn
|
||||
run: ng config --global cli.packageManager yarn
|
||||
|
||||
- name: Yarn install
|
||||
- name: Install dependencies
|
||||
working-directory: Frontend
|
||||
run: yarn install
|
||||
run: npm ci
|
||||
|
||||
- name: Build Angular
|
||||
working-directory: Frontend
|
||||
@@ -43,29 +41,38 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup dotnet 9
|
||||
- name: Setup .NET 8
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 9.0.x
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: WebAPI
|
||||
run: dotnet restore
|
||||
- name: Restore dependencies
|
||||
working-directory: src/Backend
|
||||
run: dotnet restore DiunaBI.sln
|
||||
|
||||
- name: Build
|
||||
working-directory: WebAPI
|
||||
- name: Build solution
|
||||
working-directory: src/Backend
|
||||
run: dotnet build DiunaBI.sln --configuration Release --no-restore
|
||||
|
||||
- name: Publish WebAPI
|
||||
working-directory: src/Backend
|
||||
run: |
|
||||
dotnet build --configuration Release --no-restore
|
||||
dotnet publish --configuration Release --framework net9.0 --runtime linux-x64 --self-contained false --output ./WebApiBuild
|
||||
dotnet publish DiunaBI.WebAPI/DiunaBI.WebAPI.csproj \
|
||||
--configuration Release \
|
||||
--framework net8.0 \
|
||||
--runtime linux-x64 \
|
||||
--self-contained false \
|
||||
--output ../../build/webapi
|
||||
|
||||
- name: Clean up
|
||||
working-directory: WebAPI
|
||||
run: |
|
||||
rm ./WebApiBuild/appsettings.Development.json
|
||||
rm ./WebApiBuild/client_secrets.Development.json
|
||||
- name: Clean up sensitive files
|
||||
working-directory: build/webapi
|
||||
run: |
|
||||
rm -f appsettings.Development.json
|
||||
rm -f client_secrets.Development.json
|
||||
rm -f diunabi-admin-firebase-Development.json
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: webapi
|
||||
path: WebAPI/WebApiBuild
|
||||
path: build/webapi
|
||||
Reference in New Issue
Block a user