NOTICKET: Api Client Generation
All checks were successful
Quality Check / Linting (push) Successful in 24s
Build Application / generate (push) Successful in 24s
Build Application / build (push) Successful in 34s
Build Application / build-docker (push) Successful in 8s
Build Application / release (push) Successful in 4s
All checks were successful
Quality Check / Linting (push) Successful in 24s
Build Application / generate (push) Successful in 24s
Build Application / build (push) Successful in 34s
Build Application / build-docker (push) Successful in 8s
Build Application / release (push) Successful in 4s
This commit is contained in:
parent
a4f27ed881
commit
dbf2a4707c
1 changed files with 22 additions and 12 deletions
|
@ -7,29 +7,39 @@ on:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
generate:
|
||||||
|
runs-on: stable
|
||||||
|
container:
|
||||||
|
image: git.euph.dev/actions/runner-java-21:1300
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||||
|
- name: "Generate"
|
||||||
|
run: just generate
|
||||||
|
- name: Upload API Client as Artifact
|
||||||
|
uses: "https://git.euph.dev/actions/upload-artifact@v3"
|
||||||
|
with:
|
||||||
|
name: api-client
|
||||||
|
path: src/app/core/server/*
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: stable
|
runs-on: stable
|
||||||
|
needs:
|
||||||
|
- generate
|
||||||
container:
|
container:
|
||||||
image: git.euph.dev/actions/runner-java-21:latest
|
image: git.euph.dev/actions/runner-java-21:latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
uses: "https://git.euph.dev/actions/checkout@v3"
|
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||||
|
- name: Download artifact from previous job
|
||||||
|
uses: "https://git.euph.dev/actions/download-artifact@v3"
|
||||||
|
with:
|
||||||
|
name: api-client
|
||||||
|
path: src/app/core/server
|
||||||
- name: "Install Angular CLI"
|
- name: "Install Angular CLI"
|
||||||
run: sudo npm i -g @angular/cli
|
run: sudo npm i -g @angular/cli
|
||||||
- name: "Install Dependencies"
|
- name: "Install Dependencies"
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: "Generate API Client"
|
|
||||||
run: |
|
|
||||||
API_VERSION="$(cat package.json | jq -r '.api_version')"
|
|
||||||
API_URL="https://git.euph.dev/TowerDefence/Server/releases/download/$API_VERSION/api.yml"
|
|
||||||
rm -rf src/app/core/server
|
|
||||||
mkdir -p src/app/core/server
|
|
||||||
npx @openapitools/openapi-generator-cli \
|
|
||||||
generate \
|
|
||||||
--openapitools src/app/core/openapitools.json \
|
|
||||||
-i "$API_URL" \
|
|
||||||
-g typescript-angular \
|
|
||||||
-o src/app/core/server
|
|
||||||
- name: Build Bundle
|
- name: Build Bundle
|
||||||
run: ng build
|
run: ng build
|
||||||
- name: Upload Binary as Artifact
|
- name: Upload Binary as Artifact
|
||||||
|
|
Loading…
Add table
Reference in a new issue