-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (50 loc) · 1.9 KB
/
cd.yaml
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
name: Continuous Delivery of Smart Contract
on:
push:
branches:
- main
concurrency: release
jobs:
ci-check-python:
name: Check Python
uses: ./.github/workflows/check-python.yaml
deploy-testnet:
runs-on: 'ubuntu-latest'
needs: ci-check-python
environment: Test
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Install algokit
run: pipx install algokit
- name: Bootstrap dependencies
run: algokit bootstrap all
- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"
- name: Build smart contracts
run: poetry run python -m smart_contracts build
- name: Deploy to testnet
run: poetry run python -m smart_contracts deploy
env:
ALGOD_SERVER: https://testnet-api.algonode.cloud
INDEXER_SERVER: https://testnet-idx.algonode.cloud
ALGOD_PORT: 443
INDEXER_PORT: 443
# Deployer mnemonic is required. If not using the dispenser mnemonic, it must also be funded with enough
# Algos to deploy and fund the smart contracts created
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
# the following secrets are not required for algonode but can also be specified if necessary
ALGOD_TOKEN: ${{ secrets.ALGOD_TOKEN }}
INDEXER_TOKEN: ${{ secrets.INDEXER_TOKEN }}
# Dispenser mnemonic is optional, but can be used to ensure the deployer account is funded
DISPENSER_MNEMONIC: ${{ secrets.DISPENSER_MNEMONIC }}