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/add npm ci #560

Merged
merged 6 commits into from
Oct 26, 2023
Merged

Feat/add npm ci #560

merged 6 commits into from
Oct 26, 2023

Conversation

julien-devatom
Copy link
Contributor

@julien-devatom julien-devatom commented Oct 24, 2023

Motivation

Morpho blue does not have any dependency (forge or npm). We can use the contracts in both hardhat and foundry projects.
If we want to ease Blue integrations to devs not working on Foundry, we can publish the package to npm.

However, publication to npm is a critical action that needs to have security about when and who can trigger the CI.

Solution

  • The workflow can be triggered by hand.
  • 've not defined an auto versioning not to have to allow the action to push on main the bumped version (security reason).
  • However, it is up to the person triggering the workflow to define a correct version.
  • There is a check to verify the semver format.
  • I have created a GitHub environment (named npm) that is scoping the deployment to the main branch only and that requires administrators' reviewals before publishing on npm

@julien-devatom julien-devatom self-assigned this Oct 24, 2023
@julien-devatom julien-devatom marked this pull request as draft October 24, 2023 16:02
MathisGD
MathisGD previously approved these changes Oct 24, 2023
@julien-devatom julien-devatom requested review from a team, Rubilmax, MerlinEgalite, Jean-Grimal, QGarchery, peyha and MathisGD and removed request for a team October 25, 2023 06:57
@julien-devatom julien-devatom marked this pull request as ready for review October 25, 2023 06:57
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
.github/workflows/npm-release.yml Outdated Show resolved Hide resolved
.github/workflows/npm-release.yml Outdated Show resolved Hide resolved
@Rubilmax
Copy link
Contributor

Just in case we ever publish ts: #561

.github/workflows/npm-release.yml Outdated Show resolved Hide resolved
@julien-devatom julien-devatom merged commit 5e515a6 into main Oct 26, 2023
4 checks passed
@julien-devatom julien-devatom deleted the feat/add-npm-ci branch October 26, 2023 12:45
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.

5 participants