-
Notifications
You must be signed in to change notification settings - Fork 14
Update deployment CI #228
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
Merged
Merged
Update deployment CI #228
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
b44108b
Add .env template
zguesmi 7ed689e
Rename private key env variable
zguesmi 1e16a5d
Update deployment CI
zguesmi 12e959b
Update hardhat config
zguesmi 36e9c63
Remove useless step
zguesmi f6b591f
Clean
zguesmi a7949a7
Rename workflow file
zguesmi 13b66de
Revert "Rename workflow file"
zguesmi 51e0267
Cleazn
zguesmi 40c7b7f
Test deployment
zguesmi 2209a6b
Comment temprarily
zguesmi 5757475
Comment temprarily
zguesmi 95a7dd4
Comment temprarily
zguesmi c2d2e7c
Add build step
zguesmi 7cd7f98
Fix ci
zguesmi 97d926c
Comment temprarily
zguesmi e7639f1
Fix CI
zguesmi f2a9ed7
Fix CI
zguesmi cf39267
Fix CI
zguesmi 3250392
Fix CI
zguesmi 6cb191a
chore: Save deployment artifacts for arbitrumSepolia (run_id: 1652419…
github-actions[bot] 1bfb0fb
Restore full ci
zguesmi eba302a
Revert "Test deployment"
zguesmi c0f1032
Fix CI
zguesmi d7a53fd
Delete old deploymetn
zguesmi 41f4688
chore: Save deployment artifacts for arbitrumSepolia (run_id: 1652471…
github-actions[bot] f5f76ec
force new deployment
zguesmi 629120d
chore: Save deployment artifacts for arbitrumSepolia (run_id: 1652502…
github-actions[bot] f88ecf2
Restaure full workflow
zguesmi 0100b06
Rename workflow file
zguesmi 06f0be3
Merge branch 'develop' into feature/deployment-ci
zguesmi 2475bdc
Unblock CI
zguesmi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
PRIVATE_KEY= | ||
# Also defined in Github environments | ||
DEPLOYER_PRIVATE_KEY= | ||
EXPLORER_API_KEY= | ||
IS_VERIFICATION_API_V2= | ||
ARBISCAN_API_KEY= | ||
|
||
# Local development | ||
FUJI_RPC_URL= | ||
ARBITRUM_SEPOLIA_RPC_URL= |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Deploy PoCo Contracts | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
network: | ||
description: 'Network' | ||
required: true | ||
type: choice | ||
options: | ||
- hardhat | ||
- arbitrumSepolia | ||
- arbitrum | ||
- avalancheFujiTestnet | ||
- bellecour | ||
default: 'hardhat' | ||
|
||
jobs: | ||
# Build and test before deploying. | ||
build-and-test: | ||
uses: ./.github/workflows/main.yml | ||
|
||
deploy: | ||
needs: build-and-test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # Required for saving deployment | ||
environment: ${{ inputs.network }} # Use the selected environment | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Nodejs | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' # Cache dependencies | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
# TODO activate later. | ||
# - name: Run fork tests | ||
# run: | | ||
# if [ "${{ inputs.network }}" == "arbitrumSepolia" ]; then | ||
# npm run test:arbitrumSepolia | ||
# elif [ "${{ inputs.network }}" == "avalancheFujiTestnet" ]; then | ||
# npm run test:fuji | ||
# fi | ||
|
||
- name: Deploy contracts | ||
env: | ||
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | ||
RPC_URL: ${{ secrets.RPC_URL }} | ||
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} | ||
# TODO: Use Etherscan V2 API | ||
# EXPLORER_API_KEY: ${{ secrets.EXPLORER_API_KEY }} | ||
# IS_VERIFICATION_API_V2: ${{ vars.IS_VERIFICATION_API_V2 }} | ||
run: npm run deploy -- --network ${{ inputs.network }} | ||
|
||
- name: Update config.json with ERC1538Proxy address | ||
if: inputs.network != 'hardhat' | ||
env: | ||
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | ||
run: npx hardhat run scripts/tools/update-config.ts --network ${{ inputs.network }} | ||
|
||
- name: Save deployment artifacts and updated config | ||
if: inputs.network != 'hardhat' | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: 'chore: Save deployment artifacts for ${{ inputs.network }} (run_id: ${{ github.run_id }})' | ||
file_pattern: 'deployments/${{ inputs.network }}/* config/config.json' | ||
commit_user_name: 'GitHub Actions Bot' | ||
commit_user_email: 'github-actions[bot]@users.noreply.github.com' | ||
commit_author: 'GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.