Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for deployment on Goerli testnet #114

Merged
merged 9 commits into from
Aug 3, 2022
22 changes: 6 additions & 16 deletions .github/workflows/contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,19 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Get upstream packages versions
uses: keep-network/ci/actions/upstream-builds-query@v1
id: upstream-builds-query
with:
upstream-builds: ${{ github.event.inputs.upstream_builds }}
query: keep-core-contracts-version = github.com/keep-network/keep-core/solidity-v1#version

- name: Resolve latest contracts
run: |
yarn upgrade \
@keep-network/keep-core@${{ steps.upstream-builds-query.outputs.keep-core-contracts-version }}
run: yarn upgrade @keep-network/keep-core@${{ github.event.inputs.environment }}

- name: Configure tenderly
if: github.event.inputs.environment == 'ropsten'
env:
TENDERLY_TOKEN: ${{ secrets.TENDERLY_TOKEN }}
run: ./config_tenderly.sh

- name: Deploy contracts
env:
CHAIN_API_URL: ${{ secrets.ROPSTEN_ETH_HOSTNAME_HTTP }}
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.ROPSTEN_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.ROPSTEN_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
CHAIN_API_URL: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }}
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOERLI_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOERLI_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
run: yarn deploy --network ${{ github.event.inputs.environment }}

- name: Bump up package version
Expand All @@ -152,7 +142,7 @@ jobs:
run: npm publish --access=public --network=${{ github.event.inputs.environment }} --tag ${{ github.event.inputs.environment }}

- name: Notify CI about completion of the workflow
uses: keep-network/ci/actions/notify-workflow-completed@v1
uses: keep-network/ci/actions/notify-workflow-completed@v2
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -201,7 +191,7 @@ jobs:
- name: Verify contracts on Etherscan
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
CHAIN_API_URL: ${{ secrets.ROPSTEN_ETH_HOSTNAME_HTTP }}
CHAIN_API_URL: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }}
run: |
yarn run hardhat --network ${{ github.event.inputs.environment }} \
etherscan-verify --license GPL-3.0 --force-license
Expand Down