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