-
Notifications
You must be signed in to change notification settings - Fork 18
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
Changes from 5 commits
439981e
65184cf
da8a58f
c7e8fb1
5fbb781
c9f33ca
0002541
8c0c77d
11c9d66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -99,7 +99,7 @@ jobs: | |||||
|
||||||
contracts-deployment-testnet: | ||||||
needs: [contracts-build-and-test] | ||||||
if: github.event_name == 'workflow_dispatch' | ||||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'goerli' | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
|
@@ -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/[email protected] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we get a package that is tagged with the environment name?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we can. Resolving |
||||||
|
||||||
- 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 | ||||||
|
@@ -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: | ||||||
|
@@ -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 | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add
&& github.event.inputs.environment == 'goerli'
?It's a manual workflow dispatch step, so maybe we could skip it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could. Generally, right now we only support
goerli
and we expect that the workflow is dispatched with thisenvironment
. I introducedgithub.event.inputs.environment == 'goerli'
condition to not run the deploy job if workflow gets accidentally run on different environment. But even without this condition we don't risk publishing of a package with some invalid contracts - deploy will fail either due to unsupportedenvironment
or due to incorrect account being used.Actually, returning error instead of cleanly exiting the workflow may be a better idea in case wrong
environment
is provided - I will remove thisenvironment
check...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8c0c77d