TD-237: Add frontend codegen (#36)

This commit is contained in:
Rinat Arsaev 2022-03-24 15:26:31 +03:00 committed by GitHub
parent 318a7a6588
commit 3efe7dffaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1746 additions and 5 deletions

21
.github/workflows/frontend-pr.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: 'Frontend: PR'
on:
pull_request:
branches: ['*']
jobs:
configured:
uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1
check:
name: Check
runs-on: ubuntu-latest
needs: configured
if: needs.configured.outputs.exists == 'true'
steps:
- uses: actions/checkout@v3
- uses: valitydev/action-frontend/setup@v0.1
- uses: valitydev/action-setup-thrift@v1.0.0
- run: npm i # protocols don't always update the package-lock.json, so installing from package.json
- name: Codegen
run: npm run codegen

24
.github/workflows/frontend-publish.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: 'Frontend: Publish'
on:
push:
branches: ['master', 'main']
jobs:
configured:
uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1
publish:
name: Publish
runs-on: ubuntu-latest
needs: configured
if: needs.configured.outputs.exists == 'true'
steps:
- uses: actions/checkout@v3
- uses: valitydev/action-frontend/setup@v0.1
- uses: valitydev/action-setup-thrift@v1.0.0
- run: npm i # protocols don't always update the package-lock.json, so installing from package.json
- name: Build
run: npm run codegen
- uses: valitydev/action-frontend/publish@v0.1
with:
npm-token: ${{ secrets.NPM_TOKEN }}

4
.gitignore vendored
View File

@ -13,3 +13,7 @@
/include/*.hrl
*.iml
# frontend
node_modules
lib

1678
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,26 @@
{
"name": "damsel",
"name": "@vality/domain-proto",
"version": "1.0.0",
"description": "",
"scripts": {
"codegen": "thrift-codegen"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/valitydev/damsel.git"
},
"author": "rbkmoney",
"license": "Apache-2.0",
"private": true
"homepage": "https://github.com/valitydev/damsel#readme",
"files": [
"lib/**/*.{js,d.ts,json}",
"**/*.thrift"
],
"main": "./lib/domain.js",
"types": "./lib/domain.d.ts",
"devDependencies": {
"@vality/thrift-codegen": "0.1.1-c81b4b7.0"
}
}