-
Notifications
You must be signed in to change notification settings - Fork 26
64 lines (62 loc) · 1.77 KB
/
deploy.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
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Deploy OS
on:
workflow_dispatch:
inputs:
network:
description: "Network to deploy to"
required: true
type: string
kernel_address:
description: "Kernel address"
required: false
type: string
deploy_os:
description: "Deploy OS"
required: false
type: boolean
contracts:
description: "Contracts to deploy (e.g. splitter, validator-staking)"
required: false
type: string
jobs:
build_contracts:
if: contains('["crnbarr93", "SlayerAnsh", "joemonem", "DimitrijeDragasevic"]', github.actor)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Contracts
run: |
sudo make version-map
make build
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: contracts
path: ./artifacts/
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: build_contracts
env:
DEPLOYMENT_CHAIN: ${{ inputs.network }}
DEPLOYMENT_KERNEL_ADDRESS: ${{ inputs.kernel_address }}
DEPLOY_OS: ${{ inputs.deploy_os }}
DEPLOY_CONTRACTS: ${{ inputs.contracts }}
SLACK_WEBHOOK_URL: "${{ secrets.DEPLOY_SLACK_WEBHOOK_URL }}"
TEST_MNEMONIC: "${{ secrets.DEPLOY_TEST_MNEMONIC }}"
RUST_LOG: info
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
components: rustfmt, clippy
profile: minimal
override: true
- name: Download Contracts
uses: actions/download-artifact@v3
with:
name: contracts
path: "./artifacts"
- name: Deploy
run: cargo run -p andromeda-deploy