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: build lit actions and update cids when building sdk #698

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

FedericoAmura
Copy link
Contributor

@FedericoAmura FedericoAmura commented Oct 16, 2024

Description

This PR:

  1. When building the SDK => builds Lit Actions in wrapped-keys-lit-actions and updates the associated CID in LIT_ACTION_CID_REPOSITORY and LIT_ACTION_CID_REPOSITORY_COMMON
  2. Before publishing the SDK => publishes lit actions code to IPFS

Both things are attached to our existing processes to enforce consistency of the built, referenced and published code

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tested triggering our current sync-actions-to-ipfs script automatically on a publish dry run
  • Tested building and updating references locally

Screenshot from 2024-10-17 17-18-29

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@FedericoAmura FedericoAmura marked this pull request as ready for review October 17, 2024 15:25
Copy link
Collaborator

@Ansonhkg Ansonhkg left a comment

Choose a reason for hiding this comment

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

Nice - Just tested it it works perfectly!
image

@Ansonhkg
Copy link
Collaborator

nit: I think we need to document where do we get the LIT_IPFS_JWT token and it's from Pinata

Copy link
Contributor

@MaximusHaximus MaximusHaximus left a comment

Choose a reason for hiding this comment

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

Rather than add this logic into our pub.mjs, I'd really like to keep the logic encapsulated in NPM pre-publish hook in the package itself. Added a couple other comments in-line. Nice work getting this moving -- I ran into the dependency issue myself a few weeks ago but didn't figure out the explicit dep fix at the time. <3

packages/wrapped-keys/update-ipfs-cids.js Outdated Show resolved Hide resolved
tools/scripts/pub.mjs Outdated Show resolved Hide resolved
packages/wrapped-keys/update-ipfs-cids.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants