celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
687 stars 362 forks source link

Fix failing "Generate anvil" workflow on CI #11018

Closed arthurgousset closed 1 month ago

arthurgousset commented 1 month ago

It looks like the "Generate anvil" workflow is failing on master since:

It's failing to publish because of an invalid version in the package.json:

{
  "name": "@celo/devchain-anvil",
  "version": "0.0.",
  "description": "Anvil based devchain that contains core smart contracts of celo",
  "author": "Celo",
  "license": "LGPL-3.0"
}
npm error Invalid version: "0.0."

Source: CI

It looks like it's failing to parse the PR version here:

Run sanitized_ref_name=$(echo "master" | tr -cd '[:alnum:]-_')
  sanitized_ref_name=$(echo "master" | tr -cd '[:alnum:]-_')
  echo "sanitized_ref_name=${sanitized_ref_name}" >> $GITHUB_ENV
  shell: /usr/bin/bash -e {0}
  env:
    FOUNDRY_CACHE_KEY: 1
    PR_NUMBER: 

Source: CI

Run VERSION=
Setting version to 0.0.

Source: CI

Probably requires changing something here:

https://github.com/celo-org/celo-monorepo/blob/91b135b1644dd6225ad14f702ff65a08bdccebdb/.github/workflows/protocol-devchain-anvil.yml#L88-L99