Skip to content

CoreContracts: Devchain For Contract Release #10

CoreContracts: Devchain For Contract Release

CoreContracts: Devchain For Contract Release #10

name: 'CoreContracts: Devchain For Contract Release'
run-name: 'CoreContracts: Devchain For Contract Release'
on:
schedule:
# monthly on 1 at 0:00 UTC
- cron: 0 0 1 * *
workflow_dispatch:
env:
RELEASE_TAG: core-contracts.v11
jobs:
generate-protocol-devchain:
name: Generate protocol devchain used in celo-monorepo.yml workflow
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- tag: core-contracts.v9
node-version: 12
- tag: core-contracts.v11
node-version: 18
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.tag }}
fetch-depth: 0
submodules: recursive
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install yarn dependencies
run: git config --global url."https://".insteadOf ssh:// && yarn install
- name: Build packages
run: yarn build --ignore docs --include-dependencies
# Workaround for https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
# This is needed because some runners messup with permissions of git files and submodules. Particularly problematic for DinD runners (e.g. self-hosted+container arg)
- name: Configure git safe directories
run: git config --global --add safe.directory '*'
- name: Generate devchain of previous release
run: |
mkdir devchain
GRANTS_FILE=scripts/truffle/releaseGoldExampleConfigs.json
yarn --cwd packages/protocol devchain generate-tar devchain/devchain.tar.gz --release_gold_contracts $GRANTS_FILE
mv packages/protocol/build/contracts* devchain/
- name: Upload devchain as artifact
uses: actions/upload-artifact@v4
with:
name: devchain-${{ matrix.tag }}
path: devchain
# Max retention time is 90 days for public repos
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy
retention-days: 90