forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-contracts.yml
More file actions
42 lines (34 loc) · 1013 Bytes
/
Copy pathdeploy-contracts.yml
File metadata and controls
42 lines (34 loc) · 1013 Bytes
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
name: Deploy Contracts
on:
push:
tags:
- "contracts-v*" # e.g. git tag contracts-v1.2.0
jobs:
deploy:
name: Deploy Smart Contracts
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: contracts/package-lock.json
- name: Install dependencies
working-directory: contracts
run: npm ci
- name: Compile
working-directory: contracts
run: npm run build
- name: Run tests before deploy
working-directory: contracts
run: npm run test
- name: Deploy contracts
working-directory: contracts
run: npm run deploy
env:
STELLAR_SECRET_KEY: ${{ secrets.STELLAR_SECRET_KEY }}
STELLAR_NETWORK: ${{ secrets.STELLAR_NETWORK }}
STELLAR_RPC_URL: ${{ secrets.STELLAR_RPC_URL }}