mirror of
https://github.com/valitydev/swag-payments.git
synced 2024-11-06 09:35:22 +00:00
96c860fce1
* Add linters * Yaml lint fixes * Yaml lint fixes * Yet another lint fixes * Need more yaml lint fixes * I thinkб its last fixes with yaml lint
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: Release Erlang libraries
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v2
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
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.3"
|
|
|
|
- name: Cache Node Modules and NPM Cache
|
|
id: cache
|
|
uses: actions/cache@v3
|
|
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.3
|
|
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.3
|
|
with:
|
|
branch: release/erlang/server/v2
|
|
folder: out/erlang-server
|
|
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|