Publish to NPM (#14)

This commit is contained in:
Rinat Arsaev 2022-03-10 11:06:16 +03:00 committed by GitHub
parent 3d7e1c5e69
commit cc9875fe08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1769 additions and 1 deletions

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

@ -0,0 +1,25 @@
name: 'Frontend: PR'
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: Publish'
on:
push:
branches: ['master', 'main']
jobs:
publish:
name: 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

@ -10,3 +10,7 @@ rebar3.crashdump
include/*.hrl
src/*.erl
*.iml
# frontend
node_modules
lib

1692
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,26 @@
{
"name": "@vality/payout-manager-proto",
"version": "1.0.0",
"scripts": {
"codegen": "thrift-codegen"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/valitydev/payout-manager-proto.git"
},
"license": "Apache-2.0",
"homepage": "https://github.com/valitydev/payout-manager-proto#readme"
"homepage": "https://github.com/valitydev/payout-manager-proto#readme",
"files": [
"lib/**/*.{js,d.ts,json}"
],
"main": "./lib/payout_manager.js",
"types": "./lib/payout_manager.d.ts",
"devDependencies": {
"@vality/thrift-codegen": "^0.1.1-e636464.0",
"damsel": "github:valitydev/damsel#5addc419f26de2cd00294865feea3d997d308d77"
}
}