swag-payments/.github/workflows/release-erlang-v2.yml
renovate[bot] 285deb7348
Update JamesIves/github-pages-deploy-action action to v4.3.3 (#40)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-26 05:26:21 +00:00

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@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.1"
- 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 }}