-
Notifications
You must be signed in to change notification settings - Fork 75
51 lines (41 loc) · 1.32 KB
/
massa-web3-deploy-test-smartContract.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
name: (massa-web3) Smart contract example Deploy
on:
push:
branches: [main]
jobs:
deploy-SC-example:
defaults:
run:
working-directory: ./packages/massa-web3/examples/smartContracts/
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: ./packages/massa-web3/examples/smartContracts/contracts/package-lock.json
- name: Install dependencies
run: |
npm ci
working-directory: ./
- name: Build workspace
run: |
npm run build
working-directory: ./
- name: Deploy
run: |
echo ${{ secrets.JSON_RPC_URL_PUBLIC }}
if npm run test-smart-contract-example ; then
echo "Contracts successfully deployed!"
else
echo "Failed to deploy contracts ..."
exit 1
fi
env:
JSON_RPC_URL_PUBLIC: https://buildnet.massa.net/api/v2
JSON_RPC_URL_PRIVATE: https://buildnet.massa.net/api/v2
DEPLOYER_PRIVATE_KEY: S12srNEAvZrTb9pktYeuePpuM4taW5dfmWAZYtdqyETWTBspkoT1
RECEIVER_PRIVATE_KEY: S1ykLaxXyMnJoaWLYds8UntqKTamZ4vcxrZ1fdToR8WpWEpk3FC