Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Upgrade
on:
workflow_dispatch:
inputs:
network:
description: 'Network'
required: true
default: 'hardhat'
type: choice
options:
- hardhat
- bellecour

jobs:
upgrade:
runs-on: ubuntu-latest
permissions:
contents: write # required by git-auto-commit-action
environment: ${{ inputs.network }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -23,12 +25,15 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm ci
- run: | # TODO: Commit all file changed and create PR
- run: |
echo "Network: $NETWORK"
if [ "$NETWORK" == 'hardhat' ]; then
export IS_LOCAL_FORK=true
echo "IS_LOCAL_FORK: $IS_LOCAL_FORK"
fi
npm run upgrade
echo "IS_LOCAL_FORK: $IS_LOCAL_FORK"
npm run upgrade -- --network $NETWORK
echo $(date) > deployments/last-$NETWORK-upgrade.txt
env:
NETWORK: ${{ inputs.network }}
IS_LOCAL_FORK: ${{ inputs.network == 'hardhat'}}
PROD_PRIVATE_KEY: ${{ inputs.network == 'bellecour' && secrets.PROD_PRIVATE_KEY || '' }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Save files changed during upgrade
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## vNEXT
- Add upgrade workflow. (#64)
- Add `dealId` to `TaskClaimedWithVoucher` event. (#61)
- Add type-checking script (#53)
- Run partial upgrade tests on fork.
Expand Down
6 changes: 5 additions & 1 deletion config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const envSchema = z.object({
z.boolean().default(false),
),
MNEMONIC: z.string().optional(),
PROD_PRIVATE_KEY: z.string().regex(privateKeyRegex, 'Invalid private key format').optional(),
PROD_PRIVATE_KEY: z
.string()
.regex(privateKeyRegex, 'Invalid private key format')
.optional()
.or(z.literal('')),
IEXEC_POCO_ADDRESS: z
.string()
.regex(addressRegex, 'Invalid Ethereum address if provided')
Expand Down
1 change: 1 addition & 0 deletions deployments/last-hardhat-upgrade.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fri Feb 21 15:52:52 UTC 2025
Loading