Skip to content

Commit

Permalink
Add support for deployment on Goerli testnet
Browse files Browse the repository at this point in the history
Görli became a recommended test network after Ropsten's deprecation
notice (https://blog.ethereum.org/2022/06/21/testnet-deprecation/).
We're modifying GitHub Actions workflow for deploying `coverage-pools`
contracts to support the deployment on Görli.

NOTE: We're temporarily using some testing configuration in the
workflow, which needs to be removed before merge to `main`.
  • Loading branch information
michalinacienciala committed Aug 4, 2022
1 parent 7740f43 commit 6f5ad4f
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,21 @@ 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
tbtc-contracts-version = github.com/keep-network/tbtc/solidity#version
- name: Resolve latest contracts
run: |
yarn upgrade \
@keep-network/keep-core@${{ steps.upstream-builds-query.outputs.keep-core-contracts-version }} \
@keep-network/tbtc@${{ steps.upstream-builds-query.outputs.tbtc-contracts-version }}
@keep-network/keep-core@${{ github.event.inputs.environment }} \
@keep-network/tbtc@${{ 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.KEEP_TEST_ETH_HOSTNAME_HTTP }}
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.KEEP_TEST_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
CHAIN_API_URL: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }}
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.GOERLI_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
run: yarn deploy --network ${{ github.event.inputs.environment }}

- name: Bump up package version
Expand All @@ -115,21 +105,28 @@ jobs:
commit: ${{ github.sha }}

- name: Publish to npm
# TODO: remove `--dry-run` before merge to main
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
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
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
with:
module: "github.com/keep-network/coverage-pools"
url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
environment: ${{ github.event.inputs.environment }}
upstream_builds: ${{ github.event.inputs.upstream_builds }}
upstream_ref: ${{ github.event.inputs.upstream_ref }}
version: ${{ steps.npm-version-bump.outputs.version }}
run: npm publish --access=public --network=${{ github.event.inputs.environment }} --tag ${{ github.event.inputs.environment }} --dry-run

# We're systematically moving to the v2 of the system, where different
# order of execution of modules is needed than in v1. `coverage-pools` are
# not yet ready to be included in the new (v2) CI flow. And the old (v1)
# deployment flow is now deprecated. Once coverage-pools get adjusted for
# the use in T dashboard, we'll need to uncomment this step and modify it
# for v2.
# - name: Notify CI about completion of the workflow
# uses: keep-network/ci/actions/notify-workflow-completed@v1
# env:
# GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
# with:
# module: "github.com/keep-network/coverage-pools"
# url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
# environment: ${{ github.event.inputs.environment }}
# upstream_builds: ${{ github.event.inputs.upstream_builds }}
# upstream_ref: ${{ github.event.inputs.upstream_ref }}
# version: ${{ steps.npm-version-bump.outputs.version }}

- name: Upload files needed for etherscan verification
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 6f5ad4f

Please sign in to comment.