-
Notifications
You must be signed in to change notification settings - Fork 2
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
added GitHub workflow to publish to NPM's public registry #21
added GitHub workflow to publish to NPM's public registry #21
Conversation
ok the only issue I can see with this gh-action (which is pretty nice btw):
|
Good to know. No worries if you forgot. Can you try and remember all the commands you execute in order to publish a new version of this plugin? Is it just
It certainly could be. I haven't tested this. The documentation for the
I interpreted that to me the relative path to the directory that contains the More generally though, my impression of the root directory of the Publishing the root directory of this repository makes me thing that the published artifact would also contain all the CODEDOC files used to create the documentation website. What exactly gets published by I can answer this question for .NET and NuGet packages. When building Elmish.WPF, this line causes a NuGet package to be created. Then the act of "publishing" Elmish.WPF is merely uploading this file to https://www.nuget.org/packages/Elmish.WPF. |
Well in this case, the whole project is a Node package (hence there is a
nope, only files and folders specified here will be published (alongside some defaults like the |
Oh! I didn't even notice that.
I agree with you now. Thanks for being so patient with me. I pushed a change to have the workspace be the root directory.
How do we do that? |
I suspect adding a step before - name: build the package
run: npm run build
No need to thank me, it would be actually weird if I just expected everyone to know all about how NPM works (or some other technology / framework / library / language / etc works) on an open-source project, specifically considering that I learned a lot of these stuff about NPM max 2 years ago myself (and still learning by the day) ;-) |
Ok. Added that build step. Testing seems a bit annoying. I think Since this work isn't so critical, maybe we just wait and test next time there is a new version to published. Want to complete this PR then? |
yes seems like the best way to move forward. thanks for the awesome addition! |
ok so this is failing atm and causing our commits to be invalidated. as a result, I am going to comment out the steps for now until I can setup some testing protocol for this first (perhaps using this tool or similar tools). |
Ah. Sorry that it didn't work straightaway. I see the failure, am testing locally, and am getting similar failures. I don't know what you mean by
|
No worries that was expected, what wasn't expected was the amount of emails and alerts that GitHub fires for failing actions. |
Resolves #20
This PR adds a GitHub workflow to automate the publishing to NPM's public registry.
I copied this template, and then made the following modifications.
node-version
from10.0.0
to12.0.0
(since it seems like a good idea to use a newer version).workspace
from"."
to".codedoc"
(since this value gives the path to thepackage.json
file).How this works:
master
branch contains a commit with a message that matches the pattern given by the value ofcommit_pattern
. An example isRelease 1.2.3
.tag_name
andtag_message
. Continuing the previous example, the name and message would both bev1.2.3
.You have to do one thing on your end, which is to create a new GitHub secret with the name
NPM_AUTH_TOKEN
and with a value of a personal authentication token for your account on npmjs.com.