Skip to content

feat: add cliff support in TokenEscrow #2

feat: add cliff support in TokenEscrow

feat: add cliff support in TokenEscrow #2

on:
push:
tags:
- "v*.*.*"
name: "Contract Artifacts (release)"
jobs:
build:
name: "Push contract artifacts"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout source code"
uses: "actions/checkout@v3"
with:
submodules: "recursive"
- name: "Install foundry nightly"
uses: "foundry-rs/foundry-toolchain@v1"
with:
version: "nightly"
- name: "Build contracts"
run: |
forge build
- name: "Set up deploy key for artifacts repo"
uses: "webfactory/ssh-agent@v0.7.0"
with:
ssh-private-key: "${{ secrets.ARTIFACTS_RELEASE_KEY }}"
- name: Push artifacts
run: |
COMMIT_HASH="$(git log -1 --format="%H")"
git clone --depth=1 "git@github.com:zkLend/zklend-contract-artifacts" ./artifacts
mkdir -p ./artifacts/zend-token/$COMMIT_HASH
cp ./out/ZendToken.sol/ZendToken.json ./artifacts/zend-token/$COMMIT_HASH/
cp ./out/TokenEscrow.sol/TokenEscrow.json ./artifacts/zend-token/$COMMIT_HASH/
cp ./out/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json ./artifacts/zend-token/$COMMIT_HASH/
cp ./out/ProxyAdmin.sol/ProxyAdmin.json ./artifacts/zend-token/$COMMIT_HASH/
(cd ./artifacts/zend-token/ && rm -rf ./latest && ln -s ./$COMMIT_HASH ./latest)
cd ./artifacts
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "artifacts: add contract artifacts from CI"
git push