34
34
default : false
35
35
secrets :
36
36
DEVNET_SOLANA_DEPLOY_URL :
37
- required : false
38
37
MAINNET_SOLANA_DEPLOY_URL :
39
- required : false
40
38
DEVNET_DEPLOYER_KEYPAIR :
41
- required : false
42
39
MAINNET_DEPLOYER_KEYPAIR :
43
- required : false
44
40
PROGRAM_ADDRESS_KEYPAIR :
45
- required : false
46
41
DEVNET_MULTISIG :
47
- required : false
48
42
DEVNET_MULTISIG_VAULT :
49
- required : false
50
43
MAINNET_MULTISIG :
51
- required : false
52
44
MAINNET_MULTISIG_VAULT :
53
- required : false
45
+ outputs :
46
+ buffer :
47
+ description : " Program buffer address"
48
+ value : ${{ jobs.build.outputs.buffer }}
49
+ idl_buffer :
50
+ description : " IDL buffer address"
51
+ value : ${{ jobs.build.outputs.idl_buffer }}
54
52
55
53
env :
56
54
SOLANA_VERIFY_VERSION : " 0.4.0"
@@ -59,12 +57,15 @@ jobs:
59
57
build :
60
58
runs-on : ubuntu-latest
61
59
timeout-minutes : 60
60
+ outputs :
61
+ buffer : ${{ steps.program-buffer.outputs.buffer }}
62
+ idl_buffer : ${{ steps.idl-buffer.outputs.buffer }}
62
63
steps :
63
64
- uses : actions/checkout@v3
64
65
- name : Set deployment variables
65
66
run : |
66
67
# Network specific variables
67
- IS_MAINNET="${{ github.event. inputs.network == 'mainnet' }}"
68
+ IS_MAINNET="${{ inputs.network == 'mainnet' }}"
68
69
69
70
# Set URLs and Keys based on network
70
71
if [ "$IS_MAINNET" = "true" ]; then
@@ -100,7 +101,7 @@ jobs:
100
101
101
102
- name : Set Program Variables
102
103
run : |
103
- PROGRAM="${{ github.event. inputs.program || 'transaction-example' }}"
104
+ PROGRAM="${{ inputs.program || 'transaction-example' }}"
104
105
PROGRAM_NAME=${PROGRAM//-/_}
105
106
echo "Looking for program ${PROGRAM_NAME} in Anchor.toml"
106
107
cat ./Anchor.toml
@@ -144,14 +145,14 @@ jobs:
144
145
- uses : ./.github/actions/build-anchor/
145
146
with :
146
147
testing : false
147
- devnet : ${{ github.event. inputs.network == 'devnet' }}
148
+ devnet : ${{ inputs.network == 'devnet' }}
148
149
program : ${{ env.PROGRAM_NAME }}
149
150
150
151
- uses : ./.github/actions/build-verified/
151
152
id : build-verified
152
153
with :
153
154
verify-version : ${{ env.SOLANA_VERIFY_VERSION }}
154
- devnet : ${{ github.event. inputs.network == 'devnet' }}
155
+ devnet : ${{ inputs.network == 'devnet' }}
155
156
program : ${{ env.PROGRAM_NAME }}
156
157
program-id : ${{ env.PROGRAM_ID }}
157
158
@@ -206,26 +207,26 @@ jobs:
206
207
207
208
- uses : ./.github/actions/write-program-buffer/
208
209
id : program-buffer
209
- if : github.event_name == 'workflow_dispatch' && github.event. inputs.deploy == 'true'
210
+ if : inputs.deploy == 'true'
210
211
with :
211
212
program-id : ${{ env.PROGRAM_ID }}
212
213
program : ${{ env.PROGRAM_NAME }}
213
214
rpc-url : ${{ env.DEPLOY_URL }}
214
215
keypair : ${{ env.DEPLOYER_KEYPAIR }}
215
- buffer-authority-address : ${{ github.event. inputs.use-squads == 'true' && env.MULTISIG_VAULT || env.DEPLOYER_ADDRESS }}
216
+ buffer-authority-address : ${{ inputs.use-squads == 'true' && env.MULTISIG_VAULT || env.DEPLOYER_ADDRESS }}
216
217
217
218
- uses : ./.github/actions/write-idl-buffer/
218
219
id : idl-buffer
219
- if : github.event_name == 'workflow_dispatch' && github.event. inputs.upload_idl == 'true'
220
+ if : inputs.upload_idl == 'true'
220
221
with :
221
222
program-id : ${{ env.PROGRAM_ID }}
222
223
program : ${{ env.PROGRAM_NAME }}
223
224
rpc-url : ${{ env.DEPLOY_URL }}
224
225
keypair : ${{ env.DEPLOYER_KEYPAIR }}
225
- idl-authority : ${{ github.event. inputs.use-squads == 'true' && env.MULTISIG_VAULT || env.DEPLOYER_ADDRESS }}
226
+ idl-authority : ${{ inputs.use-squads == 'true' && env.MULTISIG_VAULT || env.DEPLOYER_ADDRESS }}
226
227
227
228
- uses : ./.github/actions/program-upgrade/
228
- if : github.event_name == 'workflow_dispatch' && github.event. inputs.deploy == 'true' && github.event. inputs.use-squads == 'false'
229
+ if : inputs.deploy == 'true' && inputs.use-squads == 'false'
229
230
with :
230
231
program-id : ${{ env.PROGRAM_ID }}
231
232
program : ${{ env.PROGRAM_NAME }}
@@ -235,7 +236,7 @@ jobs:
235
236
program-keypair : ${{ secrets.PROGRAM_ADDRESS_KEYPAIR }}
236
237
237
238
- uses : ./.github/actions/idl-upload/
238
- if : github.event_name == 'workflow_dispatch' && github.event. inputs.upload_idl == 'true' && github.event. inputs.use-squads == 'false'
239
+ if : inputs.upload_idl == 'true' && inputs.use-squads == 'false'
239
240
with :
240
241
program-id : ${{ env.PROGRAM_ID }}
241
242
rpc-url : ${{ env.DEPLOY_URL }}
@@ -244,21 +245,21 @@ jobs:
244
245
245
246
- uses : ./.github/actions/verify-build/
246
247
id : verify-build
247
- if : github.event_name == 'workflow_dispatch' && github.event. inputs.verify == 'true'
248
+ if : inputs.verify == 'true'
248
249
with :
249
250
verify-version : ${{ env.SOLANA_VERIFY_VERSION }}
250
251
program-id : ${{ env.PROGRAM_ID }}
251
252
program : ${{ env.PROGRAM_NAME }}
252
- network : ${{ github.event. inputs.network }}
253
+ network : ${{ inputs.network }}
253
254
rpc-url : ${{ env.DEPLOY_URL }}
254
255
keypair : ${{ env.DEPLOYER_KEYPAIR }}
255
256
repo-url : ${{ github.server_url }}/${{ github.repository }}
256
257
commit-hash : ${{ github.sha }}
257
- use-squads : ${{ github.event. inputs.use-squads }}
258
+ use-squads : ${{ inputs.use-squads }}
258
259
vault-address : ${{ env.MULTISIG_VAULT }}
259
260
260
261
- name : Deploy Program (Squads)
261
- if : github.event. inputs.deploy == 'true' && github.event. inputs.use-squads == 'true'
262
+ if : inputs.deploy == 'true' && inputs.use-squads == 'true'
262
263
run : |
263
264
# Install dependencies
264
265
npm install @sqds/multisig @solana/web3.js @coral-xyz/anchor yargs
0 commit comments