IMP-23: Publish to NPM (#12)

This commit is contained in:
Rinat Arsaev 2022-03-04 21:19:13 +03:00 committed by GitHub
parent 62c2e5081e
commit c2cb538306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1775 additions and 1 deletions

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

@ -0,0 +1,26 @@
name: Frontend PR Check
on:
pull_request:
branches:
- '*'
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init NodeJS
uses: actions/setup-node@v2
with:
node-version: '16.13.2'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Init Thrift
uses: valitydev/action-setup-thrift@v1.0.0
- name: Install Packages
run: npm ci
- name: Build
run: npm run codegen

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

@ -0,0 +1,31 @@
name: Frontend Build & Publish
on:
push:
branches: [master]
jobs:
build:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init NodeJS
uses: actions/setup-node@v2
with:
node-version: '16.13.2'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Init Thrift
uses: valitydev/action-setup-thrift@v1.0.0
- name: Install Packages
run: npm ci
- name: Build
run: npm run codegen
- name: Version Up
run: npm version prerelease --preid ${GITHUB_SHA::7} --no-git-tag-version
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

4
.gitignore vendored
View File

@ -79,3 +79,7 @@ fabric.properties
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
env.list
# frontend
node_modules
lib

1701
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,22 @@
{
"name": "@vality/magista-proto",
"version": "1.0.0",
"scripts": {
"codegen": "thrift-codegen"
},
"repository": {
"type": "git",
"url": "git+https://github.com/valitydev/magista-proto.git"
},
"license": "Apache-2.0",
"homepage": "https://github.com/valitydev/magista-proto#readme"
"homepage": "https://github.com/valitydev/magista-proto#readme",
"files": [
"lib"
],
"main": "./lib/magista.ts",
"devDependencies": {
"@vality/payout-manager-proto": "github:valitydev/payout-manager-proto#3d7e1c5e69a186c263d00b567ea49255905bce06",
"@vality/thrift-codegen": "^0.1.1-d5dc8ef.0",
"damsel": "github:valitydev/damsel#df1c52f2ebe175fabe1da4aec8ac889b2dd03a0b"
}
}