diff --git a/action.yml b/action.yml index 63c0e09..3284fee 100644 --- a/action.yml +++ b/action.yml @@ -29,53 +29,35 @@ outputs: runs: using: "composite" steps: - - uses: actions/cache@v2 - name: Cache Builds - id: cache-buffer - with: - path: | - ./target - ./buffer.out - ./idl-buffer.out - key: ${{ inputs.network }}-${{ inputs.program-id }}-anchor-verified-build-${{ hashFiles('programs/**/*.rs') }}-${{ hashFiles('./**/Cargo.lock') }} - - run: ~/.cargo/bin/anchor build --verifiable -p $PROGRAM + - run: anchor build --verifiable -p $PROGRAM shell: bash - # if: steps.cache-buffer.outputs.cache-hit != 'true' env: PROGRAM: ${{ inputs.program }} - - run: solana-keygen new -o keyp --no-bip39-passphrase - shell: bash - - run: echo KEYPAIR + - run: solana-keygen new -o buffer-keypair --no-bip39-passphrase shell: bash - env: - KEYPAIR: ${{ inputs.keypair }} - run: echo "$KEYPAIR" > ./deploy-keypair.json && chmod 600 ./deploy-keypair.json shell: bash env: KEYPAIR: ${{ inputs.keypair }} - - run: cat deploy-keypair.json - shell: bash - name: Buffer Deploy - # if: steps.cache-buffer.outputs.cache-hit != 'true' id: buffer-deploy uses: nick-invision/retry@v2 with: timeout_minutes: 30 max_attempts: 10 shell: bash - command: solana program write-buffer --buffer ./keyp -k ./deploy-keypair.json ./target/verifiable/$PROGRAM.so -u $NETWORK > ./buffer.out + command: solana program write-buffer --buffer ./buffer-keypair -k ./deploy-keypair.json ./target/verifiable/$PROGRAM.so -u $NETWORK > ./buffer.out env: NETWORK: ${{ inputs.network }} PROGRAM: ${{ inputs.program }} - name: IDL Buffer Deploy uses: nick-invision/retry@v2 id: idl-buffer-deploy - # if: steps.cache-buffer.outputs.cache-hit != 'true' with: timeout_minutes: 10 - max_attempts: 50 + max_attempts: 10 shell: bash - command: ~/.cargo/bin/anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster $NETWORK --provider.wallet ./deploy-keypair.json > idl-buffer.out + command: anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster $NETWORK --provider.wallet ./deploy-keypair.json > idl-buffer.out env: PROGRAM_ID: ${{ inputs.program-id }} PROGRAM: ${{ inputs.program }} @@ -92,10 +74,9 @@ runs: shell: bash - name: Transfer idl buffer to authority uses: nick-invision/retry@v2 - # if: steps.cache-buffer.outputs.cache-hit != 'true' with: timeout_minutes: 10 - max_attempts: 50 + max_attempts: 10 shell: bash command: anchor idl set-authority $IDL_BUFFER --provider.cluster $NETWORK --program-id $PROGRAM_ID --new-authority $AUTHORITY --provider.wallet ./deploy-keypair.json env: @@ -105,10 +86,9 @@ runs: PROGRAM_ID: ${{ inputs.program-id }} - name: Transfer buffer to authority uses: nick-invision/retry@v2 - # if: steps.cache-buffer.outputs.cache-hit != 'true' with: timeout_minutes: 10 - max_attempts: 50 + max_attempts: 10 shell: bash command: solana program set-buffer-authority $BUFFER -k ./deploy-keypair.json --new-buffer-authority $AUTHORITY -u $NETWORK env: