WIP: Build & Release
This commit is contained in:
67
.github/workflows/build.yml
vendored
67
.github/workflows/build.yml
vendored
@@ -6,32 +6,33 @@ on:
|
|||||||
branches: [ ci-cd ]
|
branches: [ ci-cd ]
|
||||||
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 }}
|
|
||||||
# uses: actions/setup-node@master
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
# with:
|
uses: actions/setup-node@master
|
||||||
# node-version: 20
|
with:
|
||||||
# - name: Install Angular CLI
|
node-version: 20
|
||||||
# run: yarn global add @angular/cli
|
- name: Install Angular CLI
|
||||||
# - name: Configure ng to use yarn
|
run: yarn global add @angular/cli
|
||||||
# run: ng config --global cli.packageManager yarn
|
- name: Configure ng to use yarn
|
||||||
# - name: Yarn install
|
run: ng config --global cli.packageManager yarn
|
||||||
# working-directory: Frontend
|
- name: Yarn install
|
||||||
# run: yarn install
|
working-directory: Frontend
|
||||||
# - name: Build Angular
|
run: yarn install
|
||||||
# working-directory: Frontend
|
- name: Build Angular
|
||||||
# run: ng build --configuration=production
|
working-directory: Frontend
|
||||||
# - name: Upload artifact
|
run: ng build --configuration=production
|
||||||
# uses: actions/upload-artifact@v4
|
- name: Upload artifact
|
||||||
# with:
|
uses: actions/upload-artifact@v4
|
||||||
# name: frontend
|
with:
|
||||||
# path: Frontend/dist
|
name: frontend
|
||||||
|
path: Frontend/dist
|
||||||
|
|
||||||
build-backend:
|
build-backend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: morska
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup dotnet 6
|
- name: Setup dotnet 6
|
||||||
@@ -45,17 +46,9 @@ jobs:
|
|||||||
working-directory: WebAPI
|
working-directory: WebAPI
|
||||||
run: |
|
run: |
|
||||||
dotnet build --configuration Release --no-restore
|
dotnet build --configuration Release --no-restore
|
||||||
dotnet publish --configuration Release --framework net8.0 --runtime linux-x64 --self-contained false --output ../build_webapi
|
dotnet publish --configuration Release --framework net8.0 --runtime linux-x64 --self-contained false --output ./WebApiBuild
|
||||||
- name: Compress files
|
- name: Upload artifact
|
||||||
run: |
|
uses: actions/upload-artifact@v4
|
||||||
tar -czvf DiunaBI-WebAPI.tar.gz ./build_webapi
|
|
||||||
- name: Copy artifacts into server
|
|
||||||
uses: garygrossgarten/github-action-scp@release
|
|
||||||
with:
|
with:
|
||||||
local: ./DiunaBI-WebAPI.tar.gz
|
name: webapi
|
||||||
remote: /home/mz/github
|
path: WebAPI/WebApiBuild
|
||||||
host: crm.bim-it.pl
|
|
||||||
username: mz
|
|
||||||
password: Sgpmk777&&
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user