Skip to content

Uncomment storing the contract #6

Uncomment storing the contract

Uncomment storing the contract #6

name: Store contract artifacts
on:
push:
branches:
- add-workflow-to-store-artifacts
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
store:
runs-on: [self-hosted, Linux, X64, large]
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6
- name: Cache Crates
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-rust-${{ hashFiles('rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-rust
- name: Build contracts
run: |
make build-dockerized
- name: Print out files
run: |
find artifacts
mkdir tmp-artifacts-to-upload
cp artifacts/router_contract.json tmp-artifacts-to-upload/azero_router.json
- name: Store artifact in S3 bucket
uses: Cardinal-Cryptography/github-actions/store-contract-artifact@v6
with:
aws-access-key-id: ${{ secrets.CONTRACTS_CMN_ARTIFACTS_RW_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.CONTRACTS_CMN_ARTIFACTS_RW_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.CONTRACTS_S3BUCKET_REGION }}
s3-bucket: ${{ secrets.CONTRACTS_S3BUCKET_NAME }}
project: common
version: ${{ github.sha }}
contract: azero_router
src-artifact: tmp-artifacts-to-upload/azero_router.json
if-exist: overwrite