forked from Stellar-split/split-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.54 KB
/
Copy pathdeploy-testnet.yml
File metadata and controls
52 lines (42 loc) · 1.54 KB
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
name: Deploy to Testnet
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev libudev-dev pkg-config
- name: Install stellar-cli
run: cargo install --locked stellar-cli
- name: Build contract (release)
run: cargo build --target wasm32-unknown-unknown --release --package split
- name: Configure testnet identity
run: stellar keys generate deployer --network testnet
- name: Fund deployer account via Friendbot
run: |
ADDR=$(stellar keys address deployer)
echo "Funding $ADDR via Friendbot..."
curl -s -f "https://friendbot.stellar.org?addr=$ADDR" > /dev/null
echo "Account funded."
- name: Deploy contract
run: |
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/split.wasm \
--source deployer \
--network testnet \
--rpc-url https://soroban-testnet.stellar.org \
--network-passphrase "Test SDF Network ; September 2015"