3434 default : false
3535 secrets :
3636 DEVNET_SOLANA_DEPLOY_URL :
37- required : false
3837 MAINNET_SOLANA_DEPLOY_URL :
39- required : false
4038 DEVNET_DEPLOYER_KEYPAIR :
41- required : false
4239 MAINNET_DEPLOYER_KEYPAIR :
43- required : false
4440 PROGRAM_ADDRESS_KEYPAIR :
45- required : false
4641 DEVNET_MULTISIG :
47- required : false
4842 DEVNET_MULTISIG_VAULT :
49- required : false
5043 MAINNET_MULTISIG :
51- required : false
5244 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 }}
5452
5553env :
5654 SOLANA_VERIFY_VERSION : " 0.4.0"
@@ -59,12 +57,15 @@ jobs:
5957 build :
6058 runs-on : ubuntu-latest
6159 timeout-minutes : 60
60+ outputs :
61+ buffer : ${{ steps.program-buffer.outputs.buffer }}
62+ idl_buffer : ${{ steps.idl-buffer.outputs.buffer }}
6263 steps :
6364 - uses : actions/checkout@v3
6465 - name : Set deployment variables
6566 run : |
6667 # Network specific variables
67- IS_MAINNET="${{ github.event. inputs.network == 'mainnet' }}"
68+ IS_MAINNET="${{ inputs.network == 'mainnet' }}"
6869
6970 # Set URLs and Keys based on network
7071 if [ "$IS_MAINNET" = "true" ]; then
@@ -100,7 +101,7 @@ jobs:
100101
101102 - name : Set Program Variables
102103 run : |
103- PROGRAM="${{ github.event. inputs.program || 'transaction-example' }}"
104+ PROGRAM="${{ inputs.program || 'transaction-example' }}"
104105 PROGRAM_NAME=${PROGRAM//-/_}
105106 echo "Looking for program ${PROGRAM_NAME} in Anchor.toml"
106107 cat ./Anchor.toml
@@ -144,14 +145,14 @@ jobs:
144145 - uses : ./.github/actions/build-anchor/
145146 with :
146147 testing : false
147- devnet : ${{ github.event. inputs.network == 'devnet' }}
148+ devnet : ${{ inputs.network == 'devnet' }}
148149 program : ${{ env.PROGRAM_NAME }}
149150
150151 - uses : ./.github/actions/build-verified/
151152 id : build-verified
152153 with :
153154 verify-version : ${{ env.SOLANA_VERIFY_VERSION }}
154- devnet : ${{ github.event. inputs.network == 'devnet' }}
155+ devnet : ${{ inputs.network == 'devnet' }}
155156 program : ${{ env.PROGRAM_NAME }}
156157 program-id : ${{ env.PROGRAM_ID }}
157158
@@ -206,26 +207,26 @@ jobs:
206207
207208 - uses : ./.github/actions/write-program-buffer/
208209 id : program-buffer
209- if : github.event_name == 'workflow_dispatch' && github.event. inputs.deploy == 'true'
210+ if : inputs.deploy == 'true'
210211 with :
211212 program-id : ${{ env.PROGRAM_ID }}
212213 program : ${{ env.PROGRAM_NAME }}
213214 rpc-url : ${{ env.DEPLOY_URL }}
214215 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 }}
216217
217218 - uses : ./.github/actions/write-idl-buffer/
218219 id : idl-buffer
219- if : github.event_name == 'workflow_dispatch' && github.event. inputs.upload_idl == 'true'
220+ if : inputs.upload_idl == 'true'
220221 with :
221222 program-id : ${{ env.PROGRAM_ID }}
222223 program : ${{ env.PROGRAM_NAME }}
223224 rpc-url : ${{ env.DEPLOY_URL }}
224225 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 }}
226227
227228 - 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'
229230 with :
230231 program-id : ${{ env.PROGRAM_ID }}
231232 program : ${{ env.PROGRAM_NAME }}
@@ -235,7 +236,7 @@ jobs:
235236 program-keypair : ${{ secrets.PROGRAM_ADDRESS_KEYPAIR }}
236237
237238 - 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'
239240 with :
240241 program-id : ${{ env.PROGRAM_ID }}
241242 rpc-url : ${{ env.DEPLOY_URL }}
@@ -244,21 +245,21 @@ jobs:
244245
245246 - uses : ./.github/actions/verify-build/
246247 id : verify-build
247- if : github.event_name == 'workflow_dispatch' && github.event. inputs.verify == 'true'
248+ if : inputs.verify == 'true'
248249 with :
249250 verify-version : ${{ env.SOLANA_VERIFY_VERSION }}
250251 program-id : ${{ env.PROGRAM_ID }}
251252 program : ${{ env.PROGRAM_NAME }}
252- network : ${{ github.event. inputs.network }}
253+ network : ${{ inputs.network }}
253254 rpc-url : ${{ env.DEPLOY_URL }}
254255 keypair : ${{ env.DEPLOYER_KEYPAIR }}
255256 repo-url : ${{ github.server_url }}/${{ github.repository }}
256257 commit-hash : ${{ github.sha }}
257- use-squads : ${{ github.event. inputs.use-squads }}
258+ use-squads : ${{ inputs.use-squads }}
258259 vault-address : ${{ env.MULTISIG_VAULT }}
259260
260261 - 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'
262263 run : |
263264 # Install dependencies
264265 npm install @sqds/multisig @solana/web3.js @coral-xyz/anchor yargs
0 commit comments