mirror of
https://github.com/valitydev/swag-api-keys-v2.git
synced 2024-11-06 02:25:17 +00:00
73d97d2d06
* TD-635: Add initial specs * Add workflows * Fix tests * Add 404 to listApiKeys
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
name: Release Erlang Libraries
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: ['**']
|
|
|
|
env:
|
|
NODEJS_VERSION: '16'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup swagger-codegen
|
|
uses: valitydev/action-setup-swagger-codegen@v0.0.4
|
|
with:
|
|
codegen-version: "2.4.25"
|
|
generator-version: "1.0.3"
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
|
cache: npm
|
|
|
|
- name: Install deps
|
|
run: npm install
|
|
|
|
- name: Bundle spec and build docsite
|
|
run: npm run build -- build_public
|
|
|
|
- name: Generate stubs
|
|
run: |
|
|
mkdir -p out
|
|
echo "Generate apikeys stubs"
|
|
swagger-codegen generate -l vality-erlang-client -i build_public/api/apikeys/swagger.json -o out/erlang-client-apikeys --additional-properties packageName=swag_client_apikeys
|
|
swagger-codegen generate -l vality-erlang-server -i build_public/api/apikeys/swagger.json -o out/erlang-server-apikeys --additional-properties packageName=swag_server_apikeys
|
|
|
|
#
|
|
|
|
- name: Deploy erlang-client-apikeys artifact to release branch
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
|
with:
|
|
branch: release/erlang/client/master
|
|
folder: out/erlang-client-apikeys
|
|
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|
|
|
|
- name: Deploy erlang-server-apikeys artifact to release branch
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
|
with:
|
|
branch: release/erlang/server/master
|
|
folder: out/erlang-server-apikeys
|
|
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|