Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: contracts publishing in CI #12102

Merged
merged 12 commits into from
Apr 4, 2024
Merged

Conversation

erikburt
Copy link
Collaborator

@erikburt erikburt commented Feb 20, 2024

Workflow for publishing contracts to NPM through CI.

Major changes in process

  1. Releases will be handled through workflows and will be triggered by tag push
    • Pre-release tags should be of the form contracts-vX.Y.Z-.+
    • Release tags should be of the form contracts-vX.Y.Z
    • Note: Tags of this form should be added as "protected tags" to the repository settings
  2. During beta publishes we will not be using --publish-branch <branch> (as was done manually)
    • --publish-branch is for making sure npm publish is only executed at the specified branch, this safe-guard is no
      longer applicable because
      • the workflow is triggered by a tag and therefore the related git ref is not directly related to a branch
      • the release branch name is dynamic/dependent on the version
  3. Removal of --publish-branch and --no-git-checks during publish-prod
    • publish-prod relies on dist-tag add which essentially switches the npm release tagged with beta, and tagging it with latest. The --publish-branch and --no-git-checks do not apply to the npm dist-tag add command, only to the npm publish command
  4. Github releases are automatically created upon a (full) release
    • They are not created for a beta/pre release

Testing

Tested in separate (forked chainlink) repository with minimum content to reproduce contract builds.

Left to do:

  • Update documentation for release process (currently in PR)
  • Merge ci-publish-npm - feat: reorder publishing, add changelog path .github#190 and update the ref to that action in this PR
  • Set an environment for the publish jobs so secrets publishing secrets are further gated
  • Set up tag protection rules for gh environment
  • Have secrets added to environment/repository
  • Test via dry-run again
  • Remove dry-run flag and use during next release cycle

RE-2226

Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@erikburt erikburt force-pushed the test/npm-contracts-publishing branch from 9a60a20 to 892fc71 Compare February 27, 2024 04:51
@erikburt erikburt changed the title [WIP] feat: contracts publishing in CI feat: contracts publishing in CI Feb 27, 2024
@erikburt erikburt force-pushed the test/npm-contracts-publishing branch from 05020e0 to a1b67ec Compare February 28, 2024 22:21
@erikburt erikburt requested a review from chainchad February 28, 2024 22:34
@erikburt erikburt marked this pull request as ready for review February 28, 2024 22:37
@erikburt erikburt requested review from a team as code owners February 28, 2024 22:37
momentmaker
momentmaker previously approved these changes Feb 29, 2024
chainchad
chainchad previously approved these changes Feb 29, 2024
Copy link
Collaborator

@chainchad chainchad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! One small comment though to confirm.

.github/workflows/solidity.yml Outdated Show resolved Hide resolved
@erikburt erikburt requested a review from a team as a code owner April 2, 2024 22:29
chainchad
chainchad previously approved these changes Apr 3, 2024
@erikburt erikburt enabled auto-merge April 4, 2024 20:40
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@erikburt erikburt added this pull request to the merge queue Apr 4, 2024
Merged via the queue into develop with commit c717767 Apr 4, 2024
109 checks passed
@erikburt erikburt deleted the test/npm-contracts-publishing branch April 4, 2024 21:01
momentmaker added a commit that referenced this pull request Apr 8, 2024
…ersion

* develop: (32 commits)
  [KS-136] Write target fixes (#12743)
  chore/release 2.10.0 to develop (#12740)
  [KS-136] Disallow non-trigger steps with no dependent ref (#12742)
  [KS-136] Correctly handle numbers in YAML by converting them to floats or ints (#12739)
  New log buffer (#12357)
  [KS-101] Add OCR3 capability contract wrapper (#12404)
  core/services/relay/evm: switch RequestRound DB & Tracker to use sqlutil.DataSource (#12706)
  Unregister filters for old coordinator contracts contract addresses from Functions LogPollerWrapper (#12696)
  Add table support for capability "type" property (#12622)
  Backout CRIB setup on develop. (#12705)
  fix node upgrade test (#12702)
  Reduces changeset scope to `minor` for semver (#12699)
  rm oz dep (#12700)
  @chainlink.contracts release v1.0.0 (#11714)
  feat: contracts publishing in CI (#12102)
  Bump default PG conns from 20->100; enable auto-scaling open conns for mercury (#12697)
  chore: chainlink-github-actions/* to v2.3.10 (#12694)
  LOOPP plugin config validation service (#12430)
  [TT-924] Migrate functions load tests to Seth (#12659)
  Enhance automation test config (AUTO-9430) (#12689)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants