-
Notifications
You must be signed in to change notification settings - Fork 37
48 lines (40 loc) · 1.32 KB
/
deploy-testnet.yml
File metadata and controls
48 lines (40 loc) · 1.32 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
name: Deploy to Testnet
on:
push:
branches: [main]
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: Build contract (release)
run: cargo build --target wasm32-unknown-unknown --release --workspace
- name: Install stellar-cli
run: cargo install --locked stellar-cli --features opt
- name: Configure testnet identity
run: |
stellar keys generate deployer --network testnet
env:
STELLAR_SECRET_KEY: ${{ secrets.TESTNET_SECRET_KEY }}
- 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"
env:
STELLAR_SECRET_KEY: ${{ secrets.TESTNET_SECRET_KEY }}