Skip to content

Commit 73d02b1

Browse files
authored
Merge pull request #114 from threshold-network/ci-goerli
Add support for deployment on Goerli testnet 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 contracts to support the deployment on Görli. We're also leaving the possibility of deployment on Ropsten (this will be removed once we have the Görli deployment battle-tested and Ropsten gets shut down). We also change the way we handle `keep-core` dependency - in V2 of our system we'll no longer planning to publish new `keep-core` packages - hence we hardcode used version of the package for given testnet.
2 parents cb75201 + 11c9d66 commit 73d02b1

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/contracts.yaml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,29 +113,19 @@ jobs:
113113
- name: Install dependencies
114114
run: yarn install --frozen-lockfile
115115

116-
- name: Get upstream packages versions
117-
uses: keep-network/ci/actions/upstream-builds-query@v1
118-
id: upstream-builds-query
119-
with:
120-
upstream-builds: ${{ github.event.inputs.upstream_builds }}
121-
query: keep-core-contracts-version = github.com/keep-network/keep-core/solidity-v1#version
122-
123116
- name: Resolve latest contracts
124-
run: |
125-
yarn upgrade \
126-
@keep-network/keep-core@${{ steps.upstream-builds-query.outputs.keep-core-contracts-version }}
117+
run: yarn upgrade @keep-network/keep-core@${{ github.event.inputs.environment }}
127118

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

134124
- name: Deploy contracts
135125
env:
136-
CHAIN_API_URL: ${{ secrets.ROPSTEN_ETH_HOSTNAME_HTTP }}
137-
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.ROPSTEN_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
138-
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.ROPSTEN_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
126+
CHAIN_API_URL: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }}
127+
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOERLI_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
128+
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOERLI_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
139129
run: yarn deploy --network ${{ github.event.inputs.environment }}
140130

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

154144
- name: Notify CI about completion of the workflow
155-
uses: keep-network/ci/actions/notify-workflow-completed@v1
145+
uses: keep-network/ci/actions/notify-workflow-completed@v2
156146
env:
157147
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
158148
with:
@@ -201,7 +191,7 @@ jobs:
201191
- name: Verify contracts on Etherscan
202192
env:
203193
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
204-
CHAIN_API_URL: ${{ secrets.ROPSTEN_ETH_HOSTNAME_HTTP }}
194+
CHAIN_API_URL: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }}
205195
run: |
206196
yarn run hardhat --network ${{ github.event.inputs.environment }} \
207197
etherscan-verify --license GPL-3.0 --force-license

0 commit comments

Comments
 (0)