mirror of
https://github.com/valitydev/swag-payments.git
synced 2024-11-06 09:35:22 +00:00
02eab7d5cc
Co-authored-by: Renovate Bot <bot@renovateapp.com>
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: Release Erlang libraries
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v2
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: "16"
|
|
|
|
- name: Setup swagger-codegen
|
|
uses: valitydev/action-setup-swagger-codegen@v0.0.1
|
|
with:
|
|
codegen-version: "2.4.25"
|
|
generator-version: "1.0.1"
|
|
|
|
- name: Cache Node Modules and NPM Cache
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
node_modules
|
|
~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install deps
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: npm install
|
|
|
|
- name: Bundle spec and build docsite
|
|
run: npm run build -- web_deploy
|
|
|
|
- name: Generate stubs
|
|
run: |
|
|
mkdir -p out
|
|
swagger-codegen generate -l vality-erlang-client -i web_deploy/swagger.json -o out/erlang-client --additional-properties packageName=swag_client
|
|
swagger-codegen generate -l vality-erlang-server -i web_deploy/swagger.json -o out/erlang-server --additional-properties packageName=swag_server
|
|
|
|
- name: Deploy erlang-client artifact to release branch
|
|
uses: JamesIves/github-pages-deploy-action@v4.3.0
|
|
with:
|
|
branch: release/erlang/client/v2
|
|
folder: out/erlang-client
|
|
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|
|
|
|
- name: Deploy erlang-server artifact to release branch
|
|
uses: JamesIves/github-pages-deploy-action@v4.3.0
|
|
with:
|
|
branch: release/erlang/server/v2
|
|
folder: out/erlang-server
|
|
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|