-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (74 loc) · 2.2 KB
/
Copy pathdeploy-program.yml
File metadata and controls
77 lines (74 loc) · 2.2 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Deploy — Program (Solana Devnet)
on:
push:
branches: [main]
jobs:
placeholder:
runs-on: ubuntu-latest
steps:
- name: Deploy not configured yet
run: echo "Program deploy will be enabled when devnet keys are configured"
# TODO: uncomment when ready to deploy
# on:
# workflow_dispatch:
# inputs:
# confirm:
# description: 'Type "deploy" to confirm devnet deployment'
# required: true
#
# jobs:
# deploy-devnet:
# runs-on: ubuntu-latest
# if: github.event.inputs.confirm == 'deploy'
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: "20"
#
# - name: Install Solana CLI
# run: |
# sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
# echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
#
# - name: Cache Solana CLI
# uses: actions/cache@v4
# with:
# path: ~/.local/share/solana
# key: solana-stable-${{ runner.os }}
#
# - name: Install Anchor CLI
# run: npm install -g @coral-xyz/anchor-cli@0.30.1
#
# - name: Cache Cargo
# uses: actions/cache@v4
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# program/target
# key: cargo-${{ hashFiles('program/programs/guardrails/Cargo.toml', 'program/Cargo.toml') }}
# restore-keys: cargo-
#
# - name: Write deploy keypair
# run: echo "${{ secrets.SOLANA_DEPLOY_KEYPAIR }}" | base64 -d > /tmp/deploy-keypair.json
#
# - name: Build
# working-directory: program
# run: anchor build
#
# - name: Deploy to devnet
# working-directory: program
# run: anchor deploy --provider.cluster devnet --provider.wallet /tmp/deploy-keypair.json
#
# - name: Sync IDL
# run: |
# cp program/target/idl/guardrails.json sdk/idl/guardrails.json
# bash scripts/sync-sdk.sh
# echo "IDL synced. Commit the updated files if changed."
#
# - name: Cleanup keypair
# if: always()
# run: rm -f /tmp/deploy-keypair.json