-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (60 loc) · 2.21 KB
/
deploy-testnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy BOS DApp - Testnet - (built using Alem)
on:
workflow_call:
inputs:
cli-version:
required: false
description: "Version of BOS CLI to use for deploy (e.g. 0.3.0)"
type: string
default: "0.3.6"
working-directory:
required: false
description: "Relative path to root"
type: string
default: "./"
signer-account-address:
required: true
description: "Account under which component code should be deployed and which will be used for signing deploy transaction"
type: string
signer-public-key:
required: true
description: "Public key for signing transactions in the format: `ed25519:<public_key>`"
type: string
secrets:
SIGNER_PRIVATE_KEY:
description: "Private key in `ed25519:<private_key>` format for signing transaction"
required: true
jobs:
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy Widgets
env:
WORKSPACE_DIRECTORY: ${{ inputs.working-directory }}
SIGNER_ACCOUNT_ID: ${{ inputs.signer-account-address }}
SIGNER_PUBLIC_KEY: ${{ inputs.signer-public-key }}
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install bos-cli-rs
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v${{ inputs.cli-version }}/bos-cli-installer.sh | sh
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install Alem globally
run: |
npm install alem -g
- name: Install Dependencies
run: |
npm install
- name: Build the workspaces
run: |
cd "$WORKSPACE_DIRECTORY"
alem build --network testnet
- name: Deploy widgets (using bos-cli-rs)
run: |
pwd
cd "$WORKSPACE_DIRECTORY/build"
bos components deploy "$SIGNER_ACCOUNT_ID" sign-as "$SIGNER_ACCOUNT_ID" network-config testnet sign-with-plaintext-private-key --signer-public-key "$SIGNER_PUBLIC_KEY" --signer-private-key "$SIGNER_PRIVATE_KEY" send