65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
name: BuildApp
|
|
on:
|
|
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
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install Angular CLI
|
|
run: yarn global add @angular/cli
|
|
|
|
- name: Configure ng to use yarn
|
|
run: ng config --global cli.packageManager yarn
|
|
|
|
- name: Yarn install
|
|
working-directory: Frontend
|
|
run: yarn install
|
|
|
|
- name: Build Angular
|
|
working-directory: Frontend
|
|
run: ng build --configuration=production
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: frontend
|
|
path: Frontend/dist
|
|
|
|
build-backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup dotnet 9
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 9.0.x
|
|
|
|
- name: Install dependencies
|
|
working-directory: WebAPI
|
|
run: dotnet restore
|
|
|
|
- name: Build
|
|
working-directory: WebAPI
|
|
run: |
|
|
dotnet build --configuration Release --no-restore
|
|
dotnet publish --configuration Release --framework net9.0 --runtime linux-x64 --self-contained false --output ./WebApiBuild
|
|
|
|
- name: Clean up
|
|
working-directory: WebAPI
|
|
run: |
|
|
rm ./WebApiBuild/appsettings.Development.json
|
|
rm ./WebApiBuild/client_secrets.Development.json
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: webapi
|
|
path: WebAPI/WebApiBuild |