Upgrade #23
Workflow file for this run
This file contains 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
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 }} | |
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 |