MetaMask / action-npm-publish

GitHub Action to publish to NPM
MIT License
8 stars 6 forks source link

Handle publishing of packages using Yarn Classic #87

Closed legobeat closed 4 months ago

legobeat commented 5 months ago

This was previously submitted as #17 and has been reworked.

Reopening as collectively hours are wasted trying to identify compatible combination of actions for legacy repos as they transition to automated publishing.

Yes, @metamask/action-npm-publish@1 does work for Yarn Classic use-cases but there are further changes in this action that would benefit those still actively maintained Yarn 1 repos.


legobeat commented 5 months ago

Noticed that one of the CI tests doesn't actually run the intended code at all, which is also fixed in this PR now. Reviewers: Let me know if you prefer me to split that part (and the associated NPM_TOKEN recognition) out in a separate PR from this one.

mcmire commented 4 months ago

Is it possible for you to test this PR on a fork of core, and also a fork of whichever library you've been working with that still uses Yarn v1? As annoying as it is that's the only real way we've been testing these actions so far.

legobeat commented 4 months ago

Is it possible for you to test this PR on a fork of core

Sure, done here. (failing with 404 because the configured NPM_TOKEN is invalid)

, and also a fork of whichever library you've been working with that still uses Yarn v1?

We actually already used a backport of this for publishing @metamask/swaps-controller@9.0.0: https://github.com/MetaMask/swaps-controller/blob/fd532ec67d920384fdaed192a05954f0c3c8800c/.github/workflows/publish-release.yml#L73

Does that suffice?

Let me know if there is any particular other repo you'd like to see tested.

mcmire commented 4 months ago

@legobeat Oh cool. No that sounds good, thanks for confirming that.

I do see that shellcheck is failing though :/

legobeat commented 4 months ago

I do see that shellcheck is failing though :/

@mcmire It fails regardless of PR contents (unrelated) but I have tested it locally.

mcmire commented 4 months ago

@legobeat Lovely 😫 Well, I have approved now.