Skip to content

Commit

Permalink
finish-release run
Browse files Browse the repository at this point in the history
  • Loading branch information
RCantu92 committed Dec 6, 2023
1 parent 6f70a46 commit 21df424
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 171 deletions.
144 changes: 72 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,52 +214,13 @@ jobs:
skip_checkout: true
# tagging_message: '${{ needs.prepare.outputs.release_version }}'

verify:
name: Verify contracts
if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''"
runs-on: ubuntu-22.04
timeout-minutes: 60
needs:
- build
- prepare
- deploy
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
- run: yarn install --frozen-lockfile

- name: Get build artifacts
uses: actions/download-artifact@v3
with:
name: contract-artifacts

- name: Verify contracts
shell: bash
run: |
yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }}
env:
INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}'
MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}'
MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}'
POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}'
POLYGON_NODE: '${{ secrets.POLYGON_NODE }}'
# ETHERSCAN "${{ secrets.ETHERSCAN }}"
POLYSCAN: '${{ secrets.POLYSCAN }}'
RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}'
ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'

# finish-release:
# name: Finish release
# if: "startsWith(github.head_ref, 'release/')"
# verify:
# name: Verify contracts
# if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''"
# runs-on: ubuntu-22.04
# timeout-minutes: 20
# environment: production
# timeout-minutes: 60
# needs:
# - build
# - prepare
# - deploy
# steps:
Expand All @@ -277,35 +238,74 @@ jobs:
# with:
# name: contract-artifacts

# - name: Complete release
# if: "needs.prepare.outputs.release_finish_cmd != ''"
# - name: Verify contracts
# shell: bash
# run: |
# yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}"
# yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }}
# env:
# INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}'
# MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}'
# MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}'
# POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}"
# POLYGON_NODE: "${{ secrets.POLYGON_NODE }}"
# POLYGON_GAS_PRICE: 1200000000000
# DEBUG: '@openzeppelin:*'
# # ETHERSCAN "${{ secrets.ETHERSCAN }}"
# POLYSCAN: '${{ secrets.POLYSCAN }}'
# DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}'
# DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}'
# RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}'
# MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}'
# INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}'
# MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}'
# MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}'
# POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}'
# POLYGON_NODE: '${{ secrets.POLYGON_NODE }}'
# # ETHERSCAN "${{ secrets.ETHERSCAN }}"
# POLYSCAN: '${{ secrets.POLYSCAN }}'
# RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}'
# ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'

# - name: Link to run in PR
# uses: actions/github-script@v6
# env:
# RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
# with:
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `[**Deploy finished**](${process.env.RUN_URL})`,
# });
finish-release:
name: Finish release
if: "startsWith(github.head_ref, 'release/')"
runs-on: ubuntu-22.04
timeout-minutes: 20
environment: production
needs:
- prepare
- deploy
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
- run: yarn install --frozen-lockfile

- name: Get build artifacts
uses: actions/download-artifact@v3
with:
name: contract-artifacts

- name: Complete release
if: "needs.prepare.outputs.release_finish_cmd != ''"
shell: bash
run: |
yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}"
env:
INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}'
MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}'
MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}'
POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}"
POLYGON_NODE: "${{ secrets.POLYGON_NODE }}"
POLYGON_GAS_PRICE: 1200000000000
DEBUG: '@openzeppelin:*'
# ETHERSCAN "${{ secrets.ETHERSCAN }}"
POLYSCAN: '${{ secrets.POLYSCAN }}'
DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}'
DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}'
RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}'
MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}'

- name: Link to run in PR
uses: actions/github-script@v6
env:
RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[**Deploy finished**](${process.env.RUN_URL})`,
});
99 changes: 0 additions & 99 deletions releases/1.2.10/polygon/config/upgrade.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,4 @@
{
"AccessManager": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder"
]
}
}
},
"AgentRegistry": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder"
]
}
}
},
"ScannerPoolRegistry": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder", "deployment.stake-allocator"
]
}

}
},
"Dispatch": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder"
]
}
}
},
"StakeAllocator": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor"
]
}

}
},
"RewardsDistributor": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway"
]
}

}
},
"StakeSubjectGateway": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder"
]
}
}
},
"FortaStaking": {
"impl": {
"opts": {
"unsafe-allow": [
"delegatecall"
],
"constructor-args": [
"deployment.forwarder"
]
}
}
},
"SlashingController": {
"impl": {
"opts": {
Expand Down

0 comments on commit 21df424

Please sign in to comment.