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
39 changes: 39 additions & 0 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Upgrade
on:
workflow_dispatch:
inputs:
network:
description: 'Network'
required: true
type: choice
options:
- hardhat
- bellecour
jobs:
upgrade:
runs-on: ubuntu-latest
permissions:
contents: write # required by git-auto-commit-action
environment: ${{ inputs.network }} # Secrets for an environment are already limited to deployments on specific branches
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Upgrade
env:
NETWORK: ${{ inputs.network }}
IS_LOCAL_FORK: ${{ inputs.network == 'hardhat'}}
PROD_PRIVATE_KEY: ${{ inputs.network == 'bellecour' && secrets.PROD_PRIVATE_KEY || '' }}
run: |
echo "Network: $NETWORK"
echo "Local fork: $IS_LOCAL_FORK"
npm run upgrade -- --network $NETWORK
- 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 Halborn "Poco v5.5 & Voucher v1.0" audit report ( #70)
- Add `dealId` to `TaskClaimedWithVoucher` event. (#61)
- Add type-checking script (#53)
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
Loading