celo-org / celo-monorepo

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

Soloseng/publishing-version-fix #11105

Closed soloseng closed 2 days ago

soloseng commented 3 days ago

Description

Updates the devchain anvil script to override the default version that is hardcoded into the package.json file

soloseng commented 2 days ago

Turns out the workflow dispatch only become available once merged to the master branch. I'll create a pr with this updated workflow on master shortly.

step-by-step of what this does:

  1. creates an anvil devchain and outputs the final state of the devchain as devchain.json
  2. Runs integration test to make sure everything is setup as expected
  3. Determines the next release version based on the current branch or github tag.
    • Pre/post audit github tags -> sets NPM version with a pre/post audit tag
    • github release tag 'core-contracts.v${N}` -> sets the version latest stable version.
    • Release branch -> sets to canary version.
    • Otherwise, does not increment the version, as it will only do a dry run
  4. Updates the package.json file with the latest version
  5. publishes the package to NPM, unless its a dry run.