Skip to content

Commit 76b1fb3

Browse files
authored
Merge pull request #2 from blooo-io/feat/LDG-467-js-lib-implement-and-test-withdraw
Feat/ldg 467 js lib implement and test withdraw
2 parents cef89e6 + 09fb354 commit 76b1fb3

20 files changed

+627
-651
lines changed

.github/main.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "main"
2+
on:
3+
- push
4+
5+
jobs:
6+
configure:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
10+
datetime: ${{ steps.get-datetime.outputs.datetime }}
11+
steps:
12+
- id: get-user
13+
run: echo "::set-output name=uid_gid::$(id -u):$(id -g)"
14+
- id: get-datetime
15+
run: echo "::set-output name=datetime::$(date +'%Y%m%d%H%M%S')"
16+
17+
build:
18+
needs: [ configure ]
19+
container:
20+
image: zondax/rust-ci:latest
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
with:
26+
submodules: true
27+
- name: Install node
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: "^16.10.0"
31+
- name: Install dependencies
32+
run: yarn install
33+
- name: Run test
34+
run: yarn test

.github/publish.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Publish packages"
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
tags:
8+
- "v[0-9]+(\\.[0-9]+)*"
9+
10+
jobs:
11+
configure:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
datetime: ${{ steps.get-datetime.outputs.datetime }}
15+
steps:
16+
- id: get-datetime
17+
run: echo "::set-output name=datetime::$(date +'%Y%m%d%H%M%S')"
18+
19+
publish_npm_package:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
with:
25+
submodules: true
26+
- name: Install node
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: '16'
30+
registry-url: "https://registry.npmjs.org/"
31+
scope: "@blooo"
32+
- name: Install yarn
33+
run: npm install -g yarn
34+
- run: yarn install
35+
- run: yarn build
36+
- name: Get latest release version number
37+
id: get_version
38+
uses: battila7/get-version-action@v2
39+
- name: Update tag
40+
run: |
41+
echo Publishing as ${{ steps.get_version.outputs.version }}
42+
npm --allow-same-version --no-git-tag-version version ${{ steps.get_version.outputs.version }}
43+
- name: Publish package
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO_GLOBAL }}
46+
run: |
47+
npm publish

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lib/
2+
lib-es/
3+
node_modules/
4+
.vscode/
5+
coverage/
6+
yarn.lock

0 commit comments

Comments
 (0)