mirror of
https://github.com/valitydev/swag-wallets.git
synced 2024-11-06 02:45:19 +00:00
Erlang build (#9)
* TD-126: Add erlang builds * mb add release? * changed to master * fixed * fixed checkout
This commit is contained in:
parent
c5d7c8d1a4
commit
88e41d6fdc
83
.github/workflows/release-erlang.yaml
vendored
Normal file
83
.github/workflows/release-erlang.yaml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
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@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- 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: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NODEJS_VERSION }}
|
||||
cache: npm
|
||||
|
||||
- name: Install deps
|
||||
run: npm install
|
||||
|
||||
- name: Bundle spec and build docsite
|
||||
run: npm run patch
|
||||
|
||||
- name: Generate stubs
|
||||
run: |
|
||||
mkdir -p out
|
||||
echo "Generate wallet stubs"
|
||||
swagger-codegen generate -l vality-erlang-client -i dist/api/wallet/swagger.json -o out/erlang-client-wallet --additional-properties packageName=swag_client_wallet
|
||||
swagger-codegen generate -l vality-erlang-server -i dist/api/wallet/swagger.json -o out/erlang-server-wallet --additional-properties packageName=swag_server_wallet
|
||||
echo "Generate payres stubs"
|
||||
swagger-codegen generate -l vality-erlang-client -i dist/api/payres/swagger.json -o out/erlang-client-payres --additional-properties packageName=swag_client_payres
|
||||
swagger-codegen generate -l vality-erlang-server -i dist/api/payres/swagger.json -o out/erlang-server-payres --additional-properties packageName=swag_server_payres
|
||||
|
||||
#
|
||||
|
||||
- name: Deploy erlang-client-wallet artifact to release branch
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.2.2
|
||||
with:
|
||||
branch: release/erlang/wallet-client/master
|
||||
folder: out/erlang-client-wallet
|
||||
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|
||||
|
||||
- name: Deploy erlang-server-wallet artifact to release branch
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.2.2
|
||||
with:
|
||||
branch: release/erlang/wallet-server/master
|
||||
folder: out/erlang-server-wallet
|
||||
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|
||||
|
||||
#
|
||||
|
||||
- name: Deploy erlang-client-payres artifact to release branch
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.2.2
|
||||
with:
|
||||
branch: release/erlang/payres-client/master
|
||||
folder: out/erlang-client-payres
|
||||
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|
||||
|
||||
- name: Deploy erlang-server-payres artifact to release branch
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.2.2
|
||||
with:
|
||||
branch: release/erlang/payres-server/master
|
||||
folder: out/erlang-server-payres
|
||||
commit-message: Release ${{ github.repository }}@${{ github.sha }}
|
29
.github/workflows/release.yml
vendored
Normal file
29
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: release
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
env:
|
||||
NODEJS_VERSION: '16'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NODEJS_VERSION }}
|
||||
cache: npm
|
||||
- run: npm install
|
||||
- name: Bundle specification
|
||||
run: npm run patch
|
||||
- name: Deploy to release branch
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||
with:
|
||||
branch: release/master
|
||||
folder: dist/api
|
||||
target-folder: api
|
||||
commit-message: release ${{ github.repository }}@${{ github.sha }} by ${{ github.actor }}
|
Loading…
Reference in New Issue
Block a user