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

Would Dfinity like to take over publishing base package on Mops? #617

Closed
ZenVoich opened this issue Feb 14, 2024 · 5 comments
Closed

Would Dfinity like to take over publishing base package on Mops? #617

ZenVoich opened this issue Feb 14, 2024 · 5 comments

Comments

@ZenVoich
Copy link
Contributor

Currently there is no team ownership implemented in mops yet.
But it is possible to store PEM file in GitHub Secrets and use github action to auto publish a package on mops when you create github release using https://github.com/ZenVoich/setup-mops?tab=readme-ov-file#publish-a-package
Working example https://github.com/ZenVoich/http-types/actions/runs/7471609722/job/20332184506

The only security thing is that someone from dfinity need to generate dfx identity PEM and save it in github secrets.

@crusso
Copy link
Contributor

crusso commented Feb 14, 2024

We are discussing this in slack. Seems like a good idea so far and I guess would make your life easier, right?

@ZenVoich
Copy link
Contributor Author

I guess would make your life easier, right?

Yes, and it seems more correct if the author of the package publishes it.

It would be great to maintain a CHANGELOG.md in this repository with only base package changes in it. On publishing, Mops parses changelog file and attaches it to the publication(and replaces refs like (#<n>) with github links).

I used to do this manually for every release.

image

Let me know, if you agree:

  1. I will prepare PR
  2. I will need a principal id of that PEM file to transfer ownership. https://docs.mops.one/cli/mops-import-identity

Also you can fill out a profile on mops using Mops CLI:

  1. Import generated identity to mops
mops import-identity -- "$(dfx identity export <identity_name>)"
  1. Set name/github/twitter
mops user set name dfinity
mops user set github dfinity
mops user set twitter dfinity
image

Name dfinity is reserved, let me know in advance and I will make it available.

@rvanasa
Copy link
Contributor

rvanasa commented Feb 15, 2024

That is very cool; thank you for the detailed info! It seems like we've come to an agreement about doing this.

Here is the principal that we intend to use for publishing the package:

uajwy-bzusi-36jtj-ajvmc-nep3q-b7zmb-wbdua-smdjo-j77n2-p7ciw-tae

Cheers!

@ZenVoich
Copy link
Contributor Author

Nice!

I have made dfinity name available, so you can set that name with the mops cli.

PR is ready for review #618

I will transfer ownership once the PR is merged.

rvanasa added a commit that referenced this issue Feb 21, 2024
Related issue #617 

Adds ability to publish a package to the mops registry when a production
github release is created.

What changed:
- Updated ic-mops to 0.39.2
- Updated readme
- Changed imports in tests to relative paths, because a package with
local dependencies cannot be published on mops.
- Added `CHANGELOG.md` with example text for the version `0.10.3`
- Added `[package]` section to `mops.toml`
- Added `[toolchain]` section to `mops.toml`, which specifies the
versions of `moc` and `wasmtime` that will be used to run tests.
- Added `mops-publish.yml` github action

To publish:
- Add `MOPS_IDENTITY_PEM` to github secrets (one-time)
- Bump version in `mops.toml`
- Make sure there is a paragraph with that version in `CHANGELOG.md`
(e.g. `## 0.10.3` or `## 0.10.4 (2024-01-10)`
- Create a production GitHub Release

On publish:
- Mops will run tests, and if the tests fail, the publication will be
aborted
- Documentation is generated automatically

---------

Co-authored-by: Claudio Russo <claudio@dfinity.org>
Co-authored-by: rvanasa <ryan.vandersmith@dfinity.org>
@ZenVoich
Copy link
Contributor Author

Ownership transferred to uajwy-bzusi-36jtj-ajvmc-nep3q-b7zmb-wbdua-smdjo-j77n2-p7ciw-tae

Extra PR to fix publishing #621

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

No branches or pull requests

3 participants